Hi there
I wrote a fairly simple wide Credit Put Spreads but I had errors when it came to run the back test, here's the logic behind it and I attached the codes, unfortunately Mia (Ask Mia) couldn't generate any answer!
The strategy is:
Selling credit put spreads on QQQ
The wide of the credit put spread is 30$.
The Delta chosen is 0.20 for the short leg (the sold contract) and the long put (bought put) is 30$ down the chain (for example if we sold at 360 (short put) and the long should be 330).
The contract Date To Expiration is any available contract around 40 to 45 Date to Expiration.
The account size is 100 000$.
We open one trade on Tuesday and another one on the Friday.
We close the position when the value of the spread has reached 2.38 times the credit collected.
We do not invest more than 70% of the account.
We take profit at 50% at (for example if we sold an option for 300$ once the value of that spread is reached 150$, we close)
Thank you very much for your help!!
The error message are:
Algorithm.Initialize() Error: During the algorithm initialization, the following exception has occurred: (see in backtest launch)
and
Stacktrace
During the algorithm initialization, the following exception has occurred: Loader.TryCreatePythonAlgorithm():
Soroosh B
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!