I currently backtest my option buying strategies on data since January 2023.
Is that enough? Or should I go further back? I do have NIFTY/BANKNIFTY 1-minute options OHLCV data since 2019. But it is generally difficult to come up with strategies that work on such a long period.
Unless you can keep adapting to changing markets with new systems, such a short window is not very useful. Even if system happens to work overall, you will not know historical risk that the system had to face and might become too optimistic. Perhaps a group of such systems based on current regime might work, but i don’t trade that way so cant say for sure - and you will still need to test over large sample.
A counter to this can be that markets may have changed permanently and this short window edge will become future long term edge. But i would find it hard to put good money for something like this and at least will need clear cut rules to stop system and some reason to believe that markets have changed for good.
While I don’t trade options, for my own trading i prefer 10+ years of data over which system should work. A working system will still have ups and downs as markets become favorable and not, but overall it will work with a decent upward equity curve.
Now one way to work with options is to have an edge in underlying and then execute via options. With that you can test the underlying edge over large sample and execution stuff over whatever options data is available. That looks good enough to me.
Ignoring data is a major mistake, nothing weird about 2020. We cant assume that markets will always be like post 2020, when they change you might suffer.
I wouldn’t trade a system with only few years of data, but anyway - at least assume future DD would be much worse and multiple times what you see in data. Hard to say how much worse, but better be conservative.
in my opinion, 10yrs is enough bcos in 1-2 yrs will miss many imp things. wnt get to knw drawdwn. if in this year n in prev. yr dd ws arnd 10k in any strategy n before ws arnd 15k or 18k so u hv to move acc to 15k not 10k n will hv to trade till double dd so hv to trade till 30k. n in some yrs, stratgy doesnt perform for 1 yr or even 2yrs n thn strts performin again so u ll leave d strategy. in 10yrs u ll get larger pic n consistency of system. use algotest to test bcos nt possible to do it manually
kindly compare if algotest data is correct with ur data n update here
One or two years is very less, you will blow up in case the drawdown goes up and you haven’t done enough position sizing for that. I would suggest use tradingview deep backtesting as well. For example, below are the backtested results for my strategy that I trade in Nifty options (actual screenshot using tradingview backtesting tool) :
Thanks for sharing the screenshot. I did not know TV has option backtesting features.
Btw, what exactly is this backtest for? If I remember correctly, NIFTY options were introduced in 2019. And even then the volume was not there for the first few months. How are you even testing an option strat for 2009-2024? How can the results be so “complete” when there isn’t any data for a big part of that period?
My guess is that it is just using the index price to “simulate” option prices, in which case, it is not very useful.
No, the strategy and the backtest is on Nifty as the underlying. So the strategy gives the signals on nifty charts, and then I trade in options. Suppose, I get a long signal, I will either buy call,future or sell a put and vice versa.
In my opinion, no amount of backtesting is enough. Back testing uses 1 min snapshot and the spikes are not counted resulting is mismatch and misleading outcome. The more numbers of legs and re entry etc involved, more incorrect will be the backtesting results.
The following points to be remembered:-
Backtesting should be used to short list a few strategies.
Yeah, the online platforms do use 1 minute snapshots of the option chain for backtesting, which can be very misleading. This was one of the reasons why I decided to write my own backtests. I use the OHLC data for each option and assume the worst whenever there is ambiguity, i.e., if a big candle hits both my SL and Target, I assume the SL was hit, etc. This gives significantly more accurate results, especially for expiry day trading.
Three things here, most algo backtests will assume SL was executed at the end of the minute, not in between. Even if some method as @iankurseth mentioned might count the Low/high that had happened in between of the minute (considering OHLC), the trigger time will be considered end of the minute, thus reentry price will be affected drastically.
Secondly, even if some smart algo logic goes to check every second, then also sharp spikes (Freak Candles) are often not captured correctly in OHLC, since data is not tick by tick.
Thirdly, ask bid plays a role in execution, specially if far ITM strikes, next weekly or monthly expiries. So, LTP method can never be accurate! And who will consider slippages? There are positive slippages and negative slippages too.
In plain language, backtesting can never be accurate, but might work as a guiding tool for general outcome.
Have been on algo for about a year everyday ! Seen all of these. But some algo developer might be wiser to comment upon!
Once you have enough sample of live trades, you can get a general estimate for slippages.
I use a multiplier on expenses for a trade to include slippage too. So if slippage = other expenses, just double the expense etc.
WIthout this, backtest will be too optimistic. And yes, we need to assume that stop hits before target etc. There will be still some differences due to data, but overall its fine. Edge should be very good in backtest so that we can get a good edge in live markets even after some degradation.