Mia Alissi I am trying to simulate bull call spread algorithm and although the mechanics of the algorithm seems to function correctly, the backtest  equity balance is not correct and I cannot trace the source of the error but I assume that it is due to the simulated early assignment functionality. How do I switch this functionatliy off? 167% drawdown It is not at all realistic.
Mia Alissi
Based on the provided code, it seems that 'Alun' is trying to implement a Bull Call Spread strategy. However, the code does not seem to have any functionality related to disabling simulated early assignment.
In QuantConnect, the simulated early assignment of options is automatically handled by the backtesting engine. When the underlying stock's price is beyond the strike price of the option, the engine will trigger an assignment event. This is to simulate the real-world scenario where the option holder may choose to exercise the option when it is in-the-money.
If 'Alun' is experiencing a 167% drawdown, it might not be due to the simulated early assignment functionality. It could be due to the strategy itself or other parts of the code. It's recommended to thoroughly debug the algorithm, check the logs and order events, and make sure the algorithm behaves as expected.
Unfortunately, without more specific information about the error or the unexpected behavior, it's hard to provide a more detailed solution. If 'Alun' continues to experience issues, they might want to consider posting a more detailed question on the QuantConnect forum where the community and the QuantConnect team can provide more targeted assistance.
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.
Chris Hernandez
Alun,Â
Did you find an answer to this? Â I am also experiencing this. Â My algorithm is using SPXW and Credit spreads. Â It doesn't seem to be related to early assignment if I also experience this with SPXW.
Ashutosh
Hi Alun ThomasÂ
Intrigued to investigate the matter, I decided to troubleshoot the issue. After making a minor adjustment, I conducted a backtest and observed a drawdown of 3.5%:
It could be beneficial to revisit and debug your code once more. If you encounter any challenges, feel free to reach out.
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.
Dennis
I'm experiencing the same kind of issue due to early assignment simulation as well, unexpected account drawdown when trading credit spreads, even with SPXW (didn't think early assignment was a thing for options like SPX, but it seems to be in QuantConnect).
I posted a very simple backtest demonstrating the problem here: Early assignment for SPX? by Dennis - QuantConnect.com
Alun Thomas
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!