Quant & algo · Research
Backtesting Nifty options strategies
An options backtest has more ways to mislead than any other kind. The contracts are replaced every week, the rules of the market have changed several times, and the price on the screen is often not a price you could have traded.
The data it needs
- Every contract, not one continuous series. Each strike and expiry is its own instrument with a short life of its own.
- End-of-day prices are free. NSE's daily F&O bhavcopy gives every contract's open, high, low, close, settlement price, volume and open interest. That is enough for a rule that acts once a day.
- Intraday rules need the option's own intraday prices. A rule that enters at 9:20 or exits at a stop cannot be tested on daily bars, or on the index alone. That data is sold, not given away.
- The index and India VIX, to choose strikes and sizes the way they would have been chosen on the day.
The contract kept changing
A long backtest of Nifty options runs across several different markets.
- Expiry day. Nifty's weekly options expired on Thursdays until the end of August 2025. Since 1 September 2025 they expire on Tuesdays.
- Weekly contracts. Since November 2024 each exchange may offer weekly options on one index only. On NSE that is Nifty: Bank Nifty and the others are monthly now.
- Lot size. A Nifty lot went from 25 to 75 for contracts introduced from November 2024, and to 65 for contracts expiring from January 2026. It had changed more than once before that.
- Margin and premium rules. Since late 2024 short index options carry an extra 2% margin on expiry day, and since February 2025 option buyers pay the full premium up front and calendar spreads lose their margin benefit on expiry day.
- Tax. Securities transaction tax on options was raised in October 2024 and again from 1 April 2026.
A test that sells four weekly expiries a week across three indices describes a market that has not existed since 2024. Each rule should be tested under the terms it would trade on today, and the earlier years read with that in mind.
Prices you could not have traded
A closing or settlement price is a calculated figure. Nobody was offering to trade there in size.
Away from the money, the gap between the buying and the selling price can be a large share of the premium. The smallest price step is five paise: on an option worth two rupees, one step is 2.5%.
A stop-loss tested on a day's high and low assumes the order was filled at the stop. On a fast day an option's price jumps past it, and the first minutes after the open have the widest gaps of the session.
The cure is to assume a worse price than the one printed, on the way in and on the way out, and to see whether the rule survives it.
Costs decide an options strategy
Options strategies trade often, and several legs at a time, so charges are large beside the edge.
- Securities transaction tax on the premium of every option sold: 0.15% since 1 April 2026, up from 0.1%.
- Tax at expiry. An option that expires in the money is taxed as well: 0.15% of its intrinsic value, paid by the buyer.
- Brokerage, exchange and SEBI charges, GST on those, and stamp duty on the buying side.
- Slippage, which is not printed anywhere and is usually the largest of them.
Run the test with costs at today's rates, not at the rates of the year being tested: the question is whether the rule works now.
Margin is part of the return
Selling options ties up margin. The return that matters is profit over the margin actually blocked, including the extra margin on expiry day.
Margin rises when volatility rises, which is when a short-option book is losing. A test that sizes positions on a calm day's margin understates the capital needed on the day it matters.
Buying a far option against each one sold cuts the margin and caps the loss, and it costs premium every week. A fair test compares the two on the same capital.
The days that decide the result
Selling options earns a little on most days and loses a great deal on a few. The few are the test.
- 23 March 2020: Nifty fell 12.98% in a day.
- 4 June 2024: Nifty fell 5.93% on election results, the day after rising 3.25%.
- 24 February 2022: Nifty fell 4.78%.
- 20 September 2019: Nifty rose 5.32%. A short call loses on days like this.
If the test period holds none of these, it has not tested the strategy. If it holds them and shows no bad day, check the data and the fills before believing it.
Counting it properly
Two hundred weekly expiries are two hundred trades. They are not two hundred separate pieces of evidence, because they fall in a handful of calm and stormy periods.
Split the result by the kind of market: rising or falling, calm or nervous. A rule that made all its money in one calm stretch has been seen to work once.
Schema does the same with every figure it publishes: it counts separate episodes, and says so when there are too few. Does max pain work? is one such count across every Nifty expiry since 2019.
What a trustworthy options backtest shows
- The rule in full: strikes, entry time, exits, sizing and what happens on expiry day.
- Where every price came from, and the allowance made for slippage.
- Results after costs at today's rates, on today's lot size and expiry day.
- Return on the margin actually blocked.
- The worst day, the worst month and the deepest fall, with dates.
- Results by kind of market, and on a period the rule was not built on.
If you have an options rule and want it tested this way, write to Aurevian.
Questions people ask
How do I backtest a Nifty options strategy?
Use the price history of each individual contract, choose strikes with only what was known at the time, apply today's lot size, expiry day and costs, allow for slippage, measure return on margin, and check the result on the worst days and on a period the rule was not built on.
Where can I get historical Nifty options data?
NSE's daily F&O bhavcopy is free and gives end-of-day prices and open interest for every contract. Intraday option prices have to be bought from a data vendor or recorded yourself.
Why do option selling backtests look so good?
Because the strategy wins small on most days. The rare large losses are easy to leave out or to under-model, and slippage, taxes and margin are often ignored.
What changed in Nifty options in 2024 and 2025?
Weekly options were limited to one index per exchange in November 2024, the Nifty lot rose from 25 to 75 and then fell to 65 from January 2026, extra margin was added on expiry day, and Nifty's weekly expiry moved from Thursday to Tuesday on 1 September 2025.
Can I backtest options on end-of-day data?
For a rule that acts once a day, yes. For anything that enters or exits during the day, no: it needs the option's own intraday prices.
Keep reading
Research and information, not investment advice. Historical patterns describe the past and do not promise returns.