The backtest revealed that this strategy was mainly profitable during the 2008 financial crisis and again in 2020 during the COVID-19 pandemic. In line with this observation, the authors of the source paper note that the predictive power of the first half hour is greater during periods of high volatility.
We will use intraday VIX data to investigate this observation further. This data comes from Interactive Brokers.
First, start IB Gateway:
from quantrocket.ibg import start_gateways
start_gateways(wait=True)
{'ibg1': {'status': 'running'}}
Then, collect all index listings from CBOE:
from quantrocket.master import collect_ibkr_listings
collect_ibkr_listings(exchanges="CBOE", sec_types="IND")
{'status': 'the IBKR listing details will be collected asynchronously'}
Monitor flightlog for a completion message:
quantrocket.master: INFO Collecting CBOE IND listings from IBKR website
quantrocket.master: INFO Requesting details for 206 CBOE listings found on IBKR website
quantrocket.master: INFO Saved 206 CBOE listings to securities master database
Next, we look up the Sid for VIX.
!quantrocket master get --symbols 'VIX' --exchanges 'CBOE' --sec-types 'IND' --fields 'Sid' 'Symbol' --json | json2yaml
--- - Sid: "IB13455763" Symbol: "VIX"
Next, we create a database for collecting 30-min bars for VIX:
from quantrocket.history import create_ibkr_db
create_ibkr_db("vix-30min", sids="IB13455763", bar_size="30 mins", shard="off")
{'status': 'successfully created quantrocket.v2.history.vix-30min.sqlite'}
Then collect the data:
from quantrocket.history import collect_history
collect_history("vix-30min")
{'status': 'the historical data will be collected asynchronously'}
Monitor flightlog for completion:
quantrocket.history: INFO [vix-30min] Collecting history from IBKR for 1 securities in vix-30min
quantrocket.history: INFO [vix-30min] Saved 53788 total records for 1 total securities to quantrocket.v2.history.vix-30min.sqlite