Back

Problem trying to backtest the wheel strategy

Hello,
I am trying to implment the wheel strategy, but I am not able to get the algo to run.

The strategy:
1- Sell OTM put option around -30 Delta.
2- If you get assigned the put, then sell a call option at the same strike as the assigned put (Share purchase price).
3-  repeat untill the call is excericed then goto step 1

I have tried diffrent code and logic, but I was mostly getting runtime errors or weird results. The code below runs without errors, but it doesn't place orders. Your help is appriciated.
I have been away from programing for awhile so I kinda hacked this code together mostly from Tutorial: Applied Options Bull Call Spread ... just an FYI :)

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.


I'd be interested to see this as well!

0

Hi Ahmed,

The wheel strategy has already been implemented using our API by a fellow user. See this backtest which shows the code. It will need to be adjusted slightly to match the exact parameters specified. I recommend reviewing our Introduction to Options tutorial for assistance.

Best,
Derek Melchin

1

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