Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save quantra-go-algo/96666e60c221505991a7ba58e18d1bcd to your computer and use it in GitHub Desktop.
Save quantra-go-algo/96666e60c221505991a7ba58e18d1bcd to your computer and use it in GitHub Desktop.
# Import the Apple dataframe
data = yf.download('AAPL', start='1990-01-01', end='2024-04-04', auto_adjust=True)
# Compute the daily volatility
data['vol'] = get_Daily_Volatility(data)
# Drop the rows that have NaN values
data.dropna(inplace=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment