Back

OptionStrategies - Limit Orders

Hi All,

I am slowing getting my head around the concepts in LEAN, and I have a question about OptionStrategies. The example shows them being called like so, with self.Sell. self.Sell(OptionStrategies.Straddle(self.option_symbol, atmStraddle.Strike, atmStraddle.Expiry), 2)
This (I think) places two market orders for each leg, which seems to work fine. I do however have two questions:

1. Is is possible to call these strategies with a limit order, so I can aim for an order around the midpoint of the spread?
2. Is it possible to call these strategies with a profit-taker type limit order (perhaps a limit/market order?) This would save me having to constantly monitor positions and then place a market order at that point.

Appreciate the help!
 
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.


Hey Daniel,
1. We can create a OptionStrategy that executes using limit orders by changing the OrderType and OrderPrice of the OptionLegs in the strategy.

straddle = OptionStrategies.Straddle(self.option_symbol, strike, expiry)
for leg in straddle.OptionLegs:
leg.OrderType = OrderType.Limit
leg.OrderPrice = ...

2. There isn't any way to automatically create take profits/stop losses using OptionStrategy. Instead, we will need to manually implement a straddle strategy and create take profit/stop loss orders. I've attached an example where we manually trade a straddle with take profits and stop losses, however it uses market orders to enter trades.

Best
Rahul

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.


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