Hey Community,
So I'm trying to subscribe to both sides of a futures option (ES) (E.g. puts and calls) so that I can buy them at certain time.
Up till now:
I was trying it with the basis of the futures dynamic universe setup that has worked for my other algos and then tried soemthing like this:
_CallContractSymbol = QuantConnect.Symbol.CreateOption(ContinuousContract.Symbol, Market.CME, OptionStyle.American, OptionRight.Call,callstrikeprice,new DateTime(Time.Year, Time.Month, Time.Day + 1));
And then and AddFutureContract subscription.
Despite having a single subscription gives me odd errors. When it does work, I just get 0 values for my bids and asks. Which sorta defeats the purpose of being able to buy them so something is definitely wrong.
SO. I tried to implement this code (listed in the docs in a few places for Future Options). But can't quite figure it out.
Ultimately I'm just trying to do this:
Everyday at certain time (so presumably using Scheduled Events), buy a certain put and certain call of ES options in the front month, that expire the next trading day (so 0 to 1 Days to expiration depending on the time of purchase of course. If anyone can help me with something like that, I'd be greatly appreciated.
Thanks!
Louis Szeto
Hi Echoes
I think you're trying to something like a straddle? You may take a look at this doc, and also this template algorithm. It is unsure if there is always an option expires within a day, but when it does, make sure you've subscribed on denser resolution data (e.g. minute) since daily data will gives you zeros as the data will only be consolidated and available at the end of the day (i.e. 00:00 of the next day).
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.
Echoes McCarthur
Hey Louis,
Well ES does have weeklies that expire every day (via algoseek) … the question is, does QC have those from the vendor… that I don't know.
But yes I agree the createOption route is def not the answer.
Echoes McCarthur
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!