In [15]:
%load_ext autoreload
%autoreload 2
import plotly
import plotly.graph_objs as go
import logging
from quantfinlib.util import configure_logger
from quantfinlib.datasets import load_vix

plotly.offline.init_notebook_mode()
configure_logger(verbosity=logging.WARN, log_to_file=False)

The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

VIX index Open, Close, High and Low prices

In [18]:
print('\n'.join(load_vix.__doc__.strip().split('\n')[1:13]))
    The dataset provides daily Open, Close, High, and Low values for the index.
    The VIX index is a measurement of market volatility and is often referred to as the "fear index".
    It is calculated using the implied volatility of options on the S&P 500 index.
    The VIX index provides insight into investor expectations for future market volatility.

    Source: https://www.cboe.com/tradable_products/vix/vix_historical_data/ (updated daily)

    |     DATE     | OPEN  |  HIGH  |  LOW  | CLOSE |
    |--------------|-------|--------|-------|-------|
    | 1990-01-02   | 17.24 | 17.24  | 17.24 | 17.24 |
    | 1990-01-03   | 18.19 | 18.19  | 18.19 | 18.19 |
     ...
In [14]:
df = load_vix()
fig = go.Figure(data=go.Ohlc(x=df.index,
                             open=df['OPEN'],
                             high=df['HIGH'],
                             low=df['LOW'],
                             close=df['CLOSE']))
fig.update_layout(title='VIX Index Daily Movement',
                      xaxis_title='Date',
                      yaxis_title='Index Value',
                      legend=dict(title='Value Type'),
                      template='plotly_white',
                      width=600,
                      height=400,
                      font=dict(size=12),
                      margin=dict(l=40, r=40, t=40, b=40)
                      )
fig.show()