Sample Code

A sample code to show how to get historical data for VIX

The following sample code is to get historical data for VIX from Interactive Brokers if the user has the subscription to VIX at IB. The function of superSymbol ( ) is to define the security. data.history ( ) has the same signature as the same function at Quantopian. def initialize(context): context.sec=superSymbol(secType=’IND’,symbol=’VIX’,currency=’USD’, exchange=’SMART’, primaryExchange=’CBOE’) def handle_data(context, data):

A sample code to show how to get historical data for VIX Read More »