Backtesting Option strategies via Python

I have got historical option data for last 2 years, working on getting the data for last 7-10 years.
My question is for back testing my strategies should i write the code from scratch on python or are there any tools available which can directly read the data.

I know there are some websites which allow back testing directly, buy here i want full control over my rules, eg: rules based on change in vix, rules based on last 1/2/5 days change in index etc.

I wrote my own bespoke code for backtesting and live trading. :melting_face:

But there are smarter ways to go about it like using the recently defunct but perfectly functional AutoTrader project:
https://autotrader.readthedocs.io/en/latest/

2 Likes

Hi, any resource you recommend for developing backtesting code?

No, stay away from any backtesting libraries. Most of them are written for us/forex/crypto market and take a lot of work to even make them work for the Indian market. The whole point of writing your own code is to have full control, not to get limited by the choices made by these library authors.

You can use libraries for storying data (parquet), handling data (pandas/polars/duckdb) and plotting (matplotlib/plotly).

Hey, I am also thinking in the same way, to create a backtest platform. Would you mind sharing from where I can get the last 2 years option data for minute tick, it would be better with Greeks.

Hey, do you know where I could get access to such historical options data?

+1 (preferably sensex options data)

need same

I am a newbie to programming but i think zipline can help you backtest strategies