Hi All
I would like to ask if we have access to historical data of options in backtest, as self.History won't work on that and qb.GetOptionHistory is only available in research notebook. RollingWindow will not be working as the options symbol keep changing. Thanks!
CheersLouis
Varad Kabade
Hi Louis Szeto,
Refer to the following algorithm regarding using Historical data for options.
The GetOptionHistory was created for Research purposes.
Best,
Varad Kabade
Â
Â
Louis Szeto
Hi Varad
Thanks. I know how to use an option chain, but I'm seeking if I could use Historical Data for options in backtest.
Cheers
Louis
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.
Varad Kabade
Hi Louis Szeto,
The above algorithm uses the history method to get the Historical data for options in the OnSecuritiesChanged event handler. Refer to the following code snippet.
Â
Best,
Varad KabadeÂ
Louis Szeto
Thank you Varad! I thought self.Hiistory is not for options, thanks for clarify.
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.
Louis Szeto
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!