I want to calculate a daily volatility surface in the research environment. But its hard for me to get option data. I only want to calculate one to five volatility surface per day but

opt_hist = qb.GetOptionHistory(opt.Symbol, datetime(2017, 1, 11, 10, 10), datetime(2017, 1, 12, 10, 10))

gives a bulk of options and ticker prices for every minute. It is also an unindexable object. So opt_hist[0] doesnt work. How to extract and sort options in the Research environment?

If I set

qb.GetOptionHistory(opt.Symbol, datetime(2017, 1, 11, 10, 10), datetime(2017, 1, 11, 10, 15))

I also get options for date(2017, 1, 12). Also when I restart the kernel. This is strange.

Author