Page 1 of 1

Backtesting Options Strategies

Posted: Wed Jan 19, 2022 7:35 am
by an_old_goat
Hi there

Am new to Pine script but am an old school software engineer and trader.

Just taking the covers off this tool in my search for a backtesting framework that I can use to:

A) Calculate implied volatility from closing prices
B) Backtest an options strategy (i.e. short PUT spread) based on entering positions - i.e. create order entries based on Sell strike, Buy strike, expiry, r, (calculated sigma) etc.

I see there are libraries for A, but not sure about B? Is this possible? Happy to code it up if the framework supports it