January 2020
Beginner to intermediate
432 pages
11h 24m
English
We present another method of investigating the leverage effect (fact 5). To do so, we use the VIX (CBOE Volatility Index), which is a popular metric of the stock market's expectation regarding volatility. The measure is implied by option prices on the S&P 500 index. We take the following steps:
df = yf.download(['^GSPC', '^VIX'], start='1985-01-01', end='2018-12-31', progress=False)df = df[['Adj Close']]df.columns = df.columns.droplevel(0)df = df.rename(columns={'^GSPC': 'sp500', '^VIX': 'vix'})
df['log_rtn'] = np.log(df.sp500 / df.sp500.shift(1))df['vol_rtn'] = np.log(df.vix ...
Read now
Unlock full access