Good morning Quants! I am currently developing an option strategy that involves vertical spreads, but the only way to do so seems to be on a per-leg basis. The problem with this is that it may happen that, although both legs are submitted, just one of the two ends up getting filled, while the other doesn't. Does anyone know how to avoid this problem? PS: I code in Python.
Thanks.
Giulio.
Louis Szeto
Hi GiulioC
Unless you're using LimitOrder, it is not common that options are not getting filled, as only liquid assets would attract structural product makers to create options for them and themselves would be one of their market makers. Could you attach a backtest to illustrate the issue?
BTW vertical spread can be easier handled by OptionStrategies helper class. You may refer to the Option Strategies part in docs for its usage.
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.
GiulioC
Hi Louis, and thank you for your reply!
I am actually looking for a way to trade options spreads with limit orders (the risk of getting a bad fill is just too high for me, also because I tend to profit from relatively small price changes).
Also, the QCAlgorithm built-in functions to trade options spreads (like OptionStrategies.BearCallSpread) submit Market Orders, and I just can't find a way to solve this issue :(
Anyway, thanks again.
Giulio.
Louis Szeto
Hi Giulio
In that case, you would have to order the legs one by one, but the filtering process would be similar. Using bear call spread as an example:
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.
Dee Znut
Are there any updates on using limitorders with OptionStrategy.BullCallSpreads and BearPutSpreads? Louis' solution above will not do the job because it is placing individual legs which will require a very high margin. The beauty of vertical spreads is that the margin is extremely low, but without have a limit price option in these spreads, the methods are basically useless since traders don't prefer market orders due to high bid/ask spreads on higher priced equities.
Louis Szeto
Hi Dee Znut
We have implemented Combo Limit Order on ordering legs with limit price but still using the margin of the strategy. Please refer to this docs.
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.
GiulioC
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!