Hello, I am looking for some help here but please let me know if this is not the right place or if this kind of help may be not available. I understand everybody has lots of other things to do, but would appreciate any help with this (even if just pointing me somewhere so I can learn how to do this myself; I've done coding in the past but never in thinkorswim).
I would like to back test a - what seems to be - pretty simple strategy in Thinkorswim. I know one can utilize strategies to do (back)testing on charts and generate a report so that's what I hope for: to use a strategy to backtest this approach to see what the profit/loss would be over 4-6 months back.
The strategy is based on trading SPX options and looks like this:
Thank you for any input and/or help.
I would like to back test a - what seems to be - pretty simple strategy in Thinkorswim. I know one can utilize strategies to do (back)testing on charts and generate a report so that's what I hope for: to use a strategy to backtest this approach to see what the profit/loss would be over 4-6 months back.
The strategy is based on trading SPX options and looks like this:
- On days of SPX expirations (so Mondays, Wednesdays and Fridays, and if possible excluding holidays but not critical if it's too much coding to exclude them), sell to open an iron fly with the same expiration date at 10 AM.
- The iron fly should be something like (SPX strikes based on 6/28/21): for example, sell one put and one call at the 4280 strike, buy one put at the 4275 strike and buy one call at the 4285 strike. For the strategy automation, the strike for short put and call should be set to the nearest strike relative to SPX price at that time (for example, if at 10 AM SPX = 4256, the nearest strike would be 4255). The long put and call should be set at -/+5 from the short strike, respectively.
- Buy to close the iron fly at 3 PM at the market price.
Thank you for any input and/or help.
Last edited: