Back

AddOption Daily Resolution not working

My Initialize() function is below. I'm interested in daily resolution for SPY options and the underlying. 

def Initialize(self):
self.SetStartDate(2017, 1, 1)
self.SetEndDate(datetime.now())
self.SetCash(50000)

equity = self.AddEquity("SPY", Resolution.Daily)
option = self.AddOption("SPY", Resolution.Daily)

Per the docs here I would expect to be able to use Resolution.Daily, however, I'm seeing the error: 

During the algorithm initialization, the following exception has occurred: ArgumentException : Sorry Daily is not a supported resolution for ZipEntryName and SecurityType.Option. Please change your AddData to use one of the supported resolutions (Minute).

Any Ideas?

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.


In my experience, only Second resolution works for Options. If you need hourly or daily data to speed up simulation, you need to use consolidators.

I just posted a related question (“Getting specific option data efficiently”), I have attached by backtest which has sample code.  I am also looking for some efficient ways to fetch options data.

1

Hello William, Sachin, 

Due to the volume of the data, we only host minute resolution files for options. I appreciate you looked through LEAN documentation and if the files were on disk it might work as you suggest. The full documentation for options and how to use is can be found here.

The error message here is actually directing to the supported resolution: (Please change your AddData to use one of the supported resolutions (Minute))

Thank you for choosing QuantConnect! Happy Holidays!

Best
Jared

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.


Thank you Jared for correcting me and providing insight.

Sachin

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