Back

Options Historical Data

Hello 

I'm new to QC and was playing around with the notebook example. Could someone help me with the following questions please -

 

 a) Noticed that historical options data is not available for recent business days. To illustrate, last available date (as of today) for AMZN is Nov 27, 2018. Is there a way to pull more recent history?

amzn = qb.AddOption("AMZN")

amzn.SetFilter(-2, 2, timedelta(0), timedelta(180))

option_history = qb.GetOptionHistory(amzn.Symbol, datetime(2018, 11, 27))
print (option_history.GetStrikes())
print (option_history.GetExpiryDates())
h7 = option_history.GetAllData()

b) How do I use option_history object to query specific expiry days?

 

Many Thanks!

Update Backtest







re 1: Historical options data is not currently up to date (Nov 29 was the latest as I write this) but QC are currently working on installing new infrastructure to speed up the update of this data. I've been waiting patiently for this - hopefully will be in place soon. You can check the data status by using the data explorer.
re 2: I don't think it's possible to query specific expiry days. You can only get a specific lookback period of data and then process each date as needed.

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed

 
";