Observed that ImmediateFillModel with aggregate pricing of orderSides ask/bid price is not filling for midPrice for each of the legs aggregate. When using the ComboLimitOrder, I am looking at having it filled at the midPrice aggregate for all the legs combined. How to implement it?
Should the limit price need to be positive for Credit and negative for Debit in the ComboLimitOrder? Any documentation/code on how it's used?
Anyone using ComboLimitOrder with IBKR for Live Trading? Any Feedback?
Thanks
Mia Alissi
To implement a fill at the mid-price aggregate for all the legs combined, you can create a custom
FillModel
. In a simulation or backtesting environment, you can assume that all orders are filled at the mid-price. Here's a basic example of how you might implement this in Python:(Source: QuantConnect Forum)
Regarding the limit price in the
ComboLimitOrder
, the quantity of the legs sets the ratio of the leg orders while the quantity argument of theComboLegLimitOrder
method sets the combo order size and acts as a global multiplier. The quantity also sets the order direction of the combo limit order, which affects how the fill model fills the order.(Source: QuantConnect Documentation)
As for using
ComboLimitOrder
with IBKR for Live Trading, the information provided in the extracts does not contain any user feedback or experiences. You might want to check the QuantConnect forum for discussions related to this topic.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.
Ram Panguluri
Provide an example of ComboLimitOrder to close an option strategy?
Mia Alissi
To close an option strategy using
ComboLimitOrder
, you would need to create a newComboLimitOrder
with the opposite quantities for each leg of the strategy. Here's an example in Python:Please note that the limit price for the closing order should be determined based on your specific strategy and the current market conditions. The example above assumes that you want to close the entire position (i.e., the quantity argument of the
ComboLimitOrder
method is 1). If you want to partially close the position, you would need to adjust this quantity accordingly.(Source: QuantConnect Documentation)
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.
Ram Panguluri
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!