Backtesting options in Thinkback


New member
New on TOS, and on here, so please pardon my noobness. I made it as far in Thinkback as finding an old option spread (SPX, basic short put spread) and scrolled thru its profit day by day. I would love to make the jump to now just setting a scenario like a 7 DTE short put spread at short 100% of underlying, and long 98%, for instance, and have TOS go thru its 10 or 15 years of data and backtest it- finding thousands of such trades, and averaging results. (I am on 2 other backtesting sites currently, and results differ somewhat, so I figure the more the merrier...or the "safer.")

In my attempts at searching for info on this I have fallen woefully short- I did see one person on this site imply only backtesting on stocks possible, not options? But they definitely have the historical options data for SPX since you can pick any old date in Thinkback and enter a trade.

If this is indeed possible, are there prewritten codes I could just buy? I cant be the first person who would like a basic spread script for options backtesting, so I thought maybe somebody made this a business? To be honest I'm not even at the point where I would know where to put the code- and no use educating myself if there is no way to actually backtest options in such an automated way. Thanks for any info.


From what I read so far, I assume you want some pre-built data or backtesting codes for the Thinkback? If so, I think the answer is no. You would have to set everything from the ground up.


New member
Thanks. Great video, but gives no indication you can do what I want, which is a bad sign. I highly suspect they don't want people tying up their servers with backtesting so extensively. The backtesting sites I am on are 40-100$ per month depending on site, and the cheaper one limits number per month. Each backtest takes 5 or 6 minutes for a single test so must really use server memory. Oh well...thanks again.


New member
Is there a way in Thinkscript to backtest a strategy that buys a 7DTE ATM options when X is true and then sells it when Y is true? Or perhaps that just looks at the cash value of the option at expiry, I.e. buy all options and hold to expiry.

Similar threads