Notebook
In [50]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

data = local_csv("vix_levels.csv")
In [51]:
data.index = pd.to_datetime(data.Date)
del data['Date']
data['slope01'] = data['VX0'] - data['VX1']
In [52]:
data.head()
Out[52]:
SAS SAS_EMA VX0 VX1 VX2 VX3 VX4 VX5 VX6 slope01
Date
2012-01-03 0.175765 0.587936 24.902193 25.892254 26.813007 27.501050 27.940388 28.365534 29.000000 -0.990061
2012-01-04 0.686150 0.592847 24.423377 25.496994 26.436171 27.142488 27.630000 28.075194 28.615937 -1.073617
2012-01-05 0.593423 0.592876 24.097270 25.223260 26.224522 26.991640 27.603884 28.116607 28.513529 -1.125990
2012-01-06 0.724917 0.599478 23.591776 24.872231 25.921182 26.675363 27.247087 27.769082 28.119133 -1.280455
2012-01-09 0.121028 0.587051 23.498289 24.762428 25.818532 26.556341 27.117257 27.657782 27.950000 -1.264138
In [53]:
corr1 = data.corr()
corr2 = data.diff().corr()
corr3 = np.log(data).diff().corr()
In [54]:
sns.set_style("darkgrid", {"axes.facecolor": ".9"})
sns.heatmap(corr1, annot = True, square = True, cmap = "seismic_r")
Out[54]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f304942cad0>
In [ ]: