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():