April 2019
Intermediate to advanced
426 pages
11h 13m
English
Let's compare the calculated VIX values against actual VIX values by reusing the DataFrame df_vix_data VIX Index that was downloaded in an earlier section, and extract only the relevant values for the corresponding week of 15th to 19th of October, 2018:
In [ ]: df_vix = df_vix_data['2018-10-14':'2018-10-21']['5. adjusted close']
The actual end-of-day VIX values for the period are as follows:
In [ ]: df_vix.head(5)Out [ ]: date
2018-10-15 21.30
2018-10-16 17.62
2018-10-17 17.40
2018-10-18 20.06
2018-10-19 19.89
Name: 5. adjusted close, dtype: float64
Let's merge the actual VIX values and the calculated values into a single DataFrame, and plot them:
In [ ]: df_merged = pd.DataFrame({ 'Calculated': pd_calcs['VIX'], 'Actual': ...Read now
Unlock full access