I do successfully retrieve US index options data on a cloud QuantBook research notebook, but unfortunately fails to do so locally.
Dataset used: “US Index Options” (downloaded the data for local use of course).
Important note: I purchased the "Trade" data from within this dataset
I ran the same code on cloud and localy, on cloud I got this print:
index: QuantConnect.Securities.Index.Index SPX 31
<class 'QuantConnect.Research.OptionHistory'>
got these expiration dates:
[datetime.datetime(2023, 3, 17, 0, 0)]
got these strikes:
[3870.0, 3875.0, 3880.0, 3885.0, 3890.0, 3895.0, 3900.0, 3905.0, 3910.0, 3915.0, 3920.0, 3925.0, 3930.0, 3935.0, 3940.0, 3945.0, 3950.0, 3955.0, 3960.0, 3965.0, 3970.0, 3975.0, 3980.0, 3985.0, 3990.0, 3995.0, 4000.0, 4005.0, 4010.0, 4015.0, 4020.0, 4025.0, 4030.0, 4035.0, 4040.0, 4045.0, 4050.0, 4055.0, 4060.0, 4065.0]
On local machine I got this print:
index: QuantConnect.Securities.Index.Index SPX 31
<class 'QuantConnect.Research.OptionHistory'>
got these expiration dates:
[]
got these strikes:
[]
Does “US Index Options” the correct data set for this use case?
Should qb.GetOptionHistory() work with only "Trade" data available locally from this data set?
Does one must purchase both the "Quote" and "Trade" (or only "Quote") data for this to work?
Louis Szeto
Hi Erez
If you're working on SPX/NQX/VIX or their relatives, that is the right one.
Does one must purchase both the "Quote" and "Trade" (or only "Quote") data for this to work?
Yes, since you only got trade data, it will only return history with trade data. Note that Options might have a lot of market makers that hosting quotes, but there might not be many actual trades happening in open market.
Best
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.
Erez Tison
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!