Back

How to restrict Option History to a given time or part of a day with GetOptionHistory

Hi,

Is there a way I can restrict GetOptionHistory to only fetch history for a given time or a smaller duration rather than a full day. 

The following :

    GetOptionHistory(so.Symbol, datetime(2017, 5, 1), Resolution.Minute)

returns history of OptionChains for each minute on the given date. What if in my strategy, I only want the histororical Option chains at a given time on a give date (e.g. return option chains at 10:30 on May 1, 2017)? Or maybe between 10:30 and 11:00?

If I only need history at a certain time, getting it for the whole day is overkill and slow the response time needlessly.

I tried this in the research environment hoping to only get the data at 10:30 but that still returned data for every minute for the given date (i.e. May 1, '17 in this example)

qb.GetOptionHistory(so.Symbol, datetime(2017, 5, 1,10,30), Resolution.Minute)

Also where can I find documentation for GetOptionHistory?

Thanks!

Update Backtest








Hi Pushkar Verma, we are considering adding a new parameter "datetime" to GetOptionHistory() method, then you can fetch history for a given minute time. You can look into the QuantBook on GitHub in reference to the GetOptionHistory() 

 https://github.com/QuantConnect/Lean/blob/master/Jupyter/QuantBook.cs

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.


Hi Jing - Thanks for quick reponse and the consideration! How can I find out once the change is made?

0

Hi, Pushkar Verma, we will update the template on the research page.

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.


Hi,

Checking on the status - I did not see any update on the template in research page. It would be greatly appreciated to get an idea of the dates, so I can plan my development accordingly.

Thanks

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