---
title: "Backtesting Options on NSE Data: Inputs, Rules, Costs"
description: "What an options backtest needs from NSE end of day files, which rules changed by date, what a sold straddle costs and how many trades a result needs."
source_url: "https://www.rupeecase.com/learn/path-19/module-19-6-backtesting-options"
---

[Path 19 6 of 16](/learn/path-19/)Backtesting options on Indian data[Next 19.7](/learn/path-19/module-19-7-walk-forward-testing)

Tuesday 16 Jun 2026 was a weekly expiry. Nifty closed at 23,989.15, and every option on that expiry settled against that close. Six days earlier, on Wednesday 10 Jun, the 23,250 straddle had sold for 346.05 a unit. The index finished 739.15 points above the strike, so the seller gave back more than was collected. One trade tells a backtester nothing, and four tell almost as little, as the [ledger](/learn/glossary#ledger) below shows. This lesson is about the work under an options backtest: the dated inputs, the rule changes a test must carry, the costs of a sold straddle and the number of trades it takes before a record means anything. The trades are an illustration of method. They are not a strategy, and nothing here is a view on where Nifty goes.

3By the end you can

1. List the dated inputs an options backtest needs and where each comes from.
2. Carry lot size, expiry day, charges and settlement regime by date through a ledger of trades.
3. Work out how many trades a result needs before an edge of a given size can be told from luck.

Watch in the terminal: what do estimated costs take? A short tutorial on sample data.

## The idea, plainly

### What does an options backtest need that a stock test does not?

A stock test needs one price series. An options test needs a whole chain for each date: every strike, with its settlement price, open interest in units and volume in contracts. NSE's end of day F&O file carries those, plus the future's own row and the lot of each contract. The rate and the expiry calendar come from elsewhere, and every one of them must carry the date of the chain. A rule is then replayed against each chain, settled at expiry, charged its costs of that date and written into a ledger.

Every stage of an options test reads something dated

A dated chain and its companions feed a rule written in advance. The expiry settles under the regime of its date, costs use the rates of its date, and the ledger keeps one line per trade. Source: RupeeCase illustration of an options backtest. As of 17 Oct 2026.

### How is a trade settled at expiry?

Nifty options are European and cash settled, so at expiry a call is worth the index close less the strike, or nothing, and a put the strike less the close, or nothing. Name the regime of each expiry. Before 3 Aug 2026 the settlement price was the index close, itself built from the constituents' volume weighted prices over the last 30 minutes. From 3 Aug to 6 Dec 2026 it is the index close set by the closing auction session. The four trades below all expired before 3 Aug. From 7 Dec 2026, under SEBI's circular of 15 Oct 2026, settlement returns to the index built from volume weighted prices over the last 30 minutes, now of continuous trading, and expiring index contracts stop trading at 3:30 pm. A rule that leans on the final pin at the close will meet different mechanics after that date, so a test across the change should flag it.

### Which rules changed inside the files?

Lot size was 75 on 11 Jun 2025 and is 65 now, so a result in rupees per lot cannot be compared across the change without restating it. The weekly expiry day moved from Thursday to Tuesday for contracts expiring from 1 Sep 2025. BANKNIFTY weekly contracts ended with the expiry of 13 Nov 2024, so a weekly BANKNIFTY test has no data after it. Keep a table of rules by date and read it row by row. The lesson on [the real cost of an F&O trade](/learn/path-12/module-12-6-cost-of-an-fo-trade) has the charges and [backtest biases](/learn/path-19/module-19-1-backtest-biases) has the wider list of traps.

Seven dated changes a test across 2024 to 2026 has to carry

1. 13 Nov 2024**Last BANKNIFTY weekly expiry**Weekly options stay only on Nifty at NSE. A weekly BANKNIFTY test ends here.

2. 21 Nov 2024**Nifty lot becomes 75**New contracts carry the larger lot. Rupee results before and after are not on one scale.

3. 1 Sep 2025**Tuesday expiries**Nifty weekly and monthly contracts expire on Tuesday. Thursday was the day before.

4. 6 Jan 2026**First weekly with a lot of 65**The lot falls from 75 to 65. The first monthly with the new lot is 27 Jan 2026.

5. 1 Apr 2026**STT on options rises**Sold and exercised options both pay 0.15%. The sale rate was 0.10% before.

6. 3 Aug 2026**Closing auction session**The cash market closes on an auction, which sets the index close that settles expiries.

7. 7 Dec 2026**Settlement on a 30 minute average**Index contracts settle on a 30 minute volume weighted average of continuous trading and stop at 3:30 pm on expiry day.

Dates are the days each rule took effect for Nifty contracts. A row of the ledger takes the lot, expiry day, charges and settlement regime of its own date. Source: NSE and SEBI circulars on lot sizes, expiry days, STT and settlement. As of 17 Oct 2026.
The term this section turns on: Ledger

From the module glossary; every term is in the Learn glossary too. Source: Module 19.6, Backtesting options on Indian data.

### What does the written rule hold?

Five things, fixed before the first run: how the strike is chosen, when the trade is entered, when it is left, how many lots it holds and what happens on a gap. Strike by distance from the future, by delta or by premium are three different rules, because each picks a different strike as volatility moves. A rule that asks for the strike nearest a given delta reads the Greeks from the chain, which need the rate and the forward of that date. A rule that adjusts when the index moves one percent needs an intraday path the free files do not hold, so a test on them can adjust only at a settlement. Write each such choice down as an assumption with the reason for it, and count every version tried, because [the lesson on biases](/learn/path-19/module-19-1-backtest-biases) shows how fast luck passes a test.

### What is a fill in a free end of day file?

The file has one settlement price for each strike and day. It has no bid, no ask and no time. A strike that did not trade still gets a settlement price from the exchange's own method, and a test that sells there assumes a price nobody paid. Keep a volume filter and report it. ATM needs a definition too: the strike nearest the future for monthly contracts and nearest the parity forward for weekly ones. The weekly chains below use the parity forward, as the files record. With a free file every entry and exit is a settlement price, because nothing else is recorded.

Watch in the terminal: what do entry, last price and weight mean? A short tutorial on sample data.

### What does a sold straddle cost to run?

The seller of an index option held to expiry pays charges on the sale. STT is 0.15% of the premium from 1 Apr 2026, NSE charges Rs 3,553 per crore of premium, SEBI takes Rs 10 per crore and GST sits on the exchange charge. The buyer who exercises pays STT on exercise, not the seller who is assigned. SEBI's fee also falls on the notional of an assigned leg, a rupee or two a lot, left out here. Brokerage is a labelled assumption and is left out here. A test that holds to expiry has few charges. A test that adjusts has many, and each adjustment is a fresh trade with its own line.

Maths: the charges on one sold lot
Premium of the lot =
straddle price
× lot size

STT = premium
× STT rate
Exchange = premium in crore
× charge per crore
SEBI fee = premium in crore
× fee per crore
GST = exchange
× GST rate

For the first trade in the ledger the premium of the lot is Rs 27,365. STT is Rs 41.05 and the exchange charge Rs 9.72. The four charges add to Rs 52.55, the first row of the charges column below.

### How many trades before the record means anything?

The four results below swing by hundreds of points around a mean that is itself uncertain. With that spread, seeing a real edge of 20 points a trade, 5.5% of the average premium, at the usual 95 percent level would take about 738 trades. At one weekly trade, that is about 14 years of Tuesdays. The unit of evidence is the trade, or better the expiry, not the day. Marking a weekly position every day adds rows, not independent outcomes.

Maths: the trades needed to see an edge
n = (1.96 × s ÷ e)²

Here s is the standard deviation of the result per trade and e the edge to be seen, both in points. The four results give a sample variance of 76,852, and s is its square root. With e = 20, n = 3.84 × 76,852 ÷ 400, which is 738 trades. Halving the edge to be seen quadruples n. Overlapping trades do not count twice, because their results move together.

## Worked example: one written rule, four trades

The rule, written before opening the files: on a date with a weekly contract six to eight days from expiry, sell one lot of the at the money straddle at the settlement price, hold to expiry and settle on the index close. ATM is the strike nearest the parity forward. Four of the school's example dates fit and have a close for their expiry in the files. All four expiries fall before 3 Aug 2026 and on a Tuesday. The lot is 65 units.

Two terms to hold on to from 19.6

From the module glossary. Source: Module 19.6, Backtesting options on Indian data.

| Trade, 2026 | Sold at | Index close | Result per lot | Charges |
| --- | --- | --- | --- | --- |
| 2 Feb to 10 Feb, 25,100 | 421.00 | 25,935.15 | −26,920 | 52.55 |
| 10 Jun to 16 Jun, 23,250 | 346.05 | 23,989.15 | −25,552 | 43.19 |
| 16 Jun to 23 Jun, 24,000 | 325.75 | 23,824.10 | 9,740 | 40.66 |
| 29 Jun to 7 Jul, 24,000 | 366.15 | 24,398.70 | −2,116 | 45.70 |
| Total of four |  |  | −44,847 | 182.10 |

The seller won only where the move stayed under the premium

Each pair is one trade. The seller gains when the bar for the index move is shorter than the bar for the premium sold. Source: NSE end of day data, computed by RupeeCase. As of 7 Jul 2026.
Three of the four June and July weeks, on the index path

Daily close of the Nifty 50, a price index. The marks show entry and expiry days. A straddle seller reads the path between them as a distance from the strike. Source: NSE end of day data, computed by RupeeCase. As of 10 Jul 2026.
Read 3 more paragraphs, 224 words
Rupees per lot before charges. Three of the four trades lost, and the ledger totals −44,847 before charges and −45,029 after them. The charges were 0.19% of the premium sold, so costs did not decide this record. The index move did. A short straddle keeps its premium only if the index closes within that many points of the strike. The closes were 835.15, 739.15, 175.90 and 398.70 points from the strike, against premiums of 421.00, 346.05, 325.75 and 366.15.

A line of the ledger holds the entry date and the expiry, the settlement regime, the strike and lot, the settlement price in and the index close out, the result before charges and each charge separately. A reader can then rebuild any line by hand from the files. If one cannot be rebuilt, it is not yet a result.

This table is also a poor sample for a second reason. The dates are the school's teaching dates, picked because something happened on them, not drawn at random. A ledger of four chosen weeks is a worked sum, and the lesson it carries is the size of the sample needed, shown above. The other half of the data question is in [where to get historical option chain data](/learn/questions/historical-option-chain-data), and [how to backtest an option strategy](/learn/questions/backtest-option-strategy) lists the steps in order.

## The common mistake

The belief: The backtest used exchange data, so its fills are what I would have got. The files are official, and the prices in them are settlements, not trades. A strike that traded a handful of contracts gets a settlement price no order stood at. Check four things before reading a ledger. Was every sale made at a strike that traded? Does each row carry its own lot, expiry day, charges and settlement regime? Were the rules written before the data was opened? And how many independent trades stand behind the total? The curve on top of the ledger is built from these, so an error in a row is an error in the curve. A ledger that answers all four is a reason to test further on data the rule has not seen, not a result.

## Key takeaways

* An options test needs a dated chain, future, rate and lot for every trade.
* A settlement price in a free file is not a fill.
* Name the settlement regime of every expiry, and flag 7 Dec 2026.
* Lot size, expiry day and STT all changed inside the files.
* Trades needed rise with the variance and fall with the square of the edge.
* Four trades chosen for teaching are a worked sum, not a sample.

Where this section sits in module 19.6

Sections 1 to 4 of 4; the highlighted one is next. Source: Module 19.6, Backtesting options on Indian data.
**Before you trade.** Derivatives trading carries a high risk of loss. SEBI's study "Profitability of Individual Traders in the Equity Derivatives Segment (FY25 to FY26)" (August 2026) found that 87.7% of individual traders in equity F&O made net losses in FY26, with aggregate net losses of Rs 91,685 crore. [Read the SEBI study](https://www.sebi.gov.in/reports-and-statistics/research/aug-2026/study-profitability-of-individual-traders-in-the-equity-derivatives-segment-fy25-fy26-_103835.html)

What does Backtesting options on Indian data cover?The chain, the lot, the expiry regime and the costs all carry a date. Four weekly trades show how little four trades say. It works through The idea, plainly, Worked example: one written rule, four trades, The common mistake, Key takeaways. It is module 19.6 of Path 19, Algo, HFT and Backtesting, about 11 minutes of reading, free.

TTry it

## F&O costs and STT, on the same example.
Every statutory charge on a trade at the 2026 rates. Dated NSE end of day data, nothing live, no orders.

**F&O costs and STT**, Nifty, 10 Jun 2026, 16 Jun 2026 expiry.

[Open the f&o costs and stt](/learn/tools/fo-cost-calculator?chain=NIFTY_2026-06-10_2026-06-16&preset=put-round-trip)

  AF&O on RupeeCase

## Hedging only, in development
F&O at RupeeCase will do one job: protect a portfolio you already own, by a rule published before it runs. No speculation, no naked option selling, no leveraged bets. It is not available yet.

  [How hedging will work](/hedging)[Sign up for RupeeCase](https://invest.rupeecase.com/signup)

  [No hedgeFalls with the marketWith a putA floor, for a premiumIllustration with made up numbers, not a product and not a recommendation.](/hedging)

QQuick check

## 10 questions, 7 to pass.
Each attempt draws 10 of the 15 questions in this module's bank, and a retake draws a fresh set. A pass gives this module's Certificate of Completion. Your result stays on this device and counts towards the Path 19 certificate.

7 of 10 correct passes module 19.6

Every answer is explained when you check; a retake is always free. Source: RupeeCase Learn quiz rules (70% to pass).

  Passed

###

  Certificate ID

Download PNGPrint or save as PDF[Check the ID](/learn/certificates/verify)
Self paced and unproctored. A record of completing free education by RupeeCase; not a NISM certificate and not endorsed by NISM, NSE, BSE or SEBI. It qualifies no one to deal, advise or publish research.

CCheck yourself

## Path 19 so far.
Your quick check results on this device, stop by stop.

Stop 6 of 16 on Path 19

Algo, HFT and Backtesting: every live stop, this module ringed. Source: RupeeCase Learn, Path 19.

1. [19.1What a backtest is, and five biases that ruin itNot yet](/learn/path-19/module-19-1-backtest-biases)
2. [19.2Strategy metrics: CAGR, Sharpe, Sortino, drawdown and expectancyNot yet](/learn/path-19/module-19-2-strategy-metrics)
3. [19.3HFT, MFT and LFT comparedNot yet](/learn/path-19/module-19-3-hft-mft-lft)
4. [19.4Colocation, latency and fairness: NSE's historyNot yet](/learn/path-19/module-19-4-colocation-and-latency)
5. [19.5Building a compliant retail algoNot yet](/learn/path-19/module-19-5-building-a-compliant-algo)
6. [19.6Backtesting options on Indian dataNot yet](/learn/path-19/module-19-6-backtesting-options#quiz)
7. [19.7Walk forward and out of sample testingNot yet](/learn/path-19/module-19-7-walk-forward-testing)
8. [19.8Monte Carlo and bootstrap of trade resultsNot yet](/learn/path-19/module-19-8-monte-carlo-and-bootstrap)
9. [19.9Microstructure models: spreads, informed trading and price impactNot yet](/learn/path-19/module-19-9-microstructure-models)
10. [19.10Market making: inventory and quotingNot yet](/learn/path-19/module-19-10-market-making)
11. [19.11Optimal execution and market impactNot yet](/learn/path-19/module-19-11-optimal-execution)
12. [19.12HFT economics and the latency raceNot yet](/learn/path-19/module-19-12-hft-economics)
13. [19.13Backtest overfitting: deflated Sharpe, PBO and multiple testingNot yet](/learn/path-19/module-19-13-backtest-overfitting)
14. [19.14Financial machine learning done carefullyNot yet](/learn/path-19/module-19-14-financial-machine-learning)
15. [19.15Expiry day market integrity: a SEBI interim order, FutEq limits and surveillanceNot yet](/learn/path-19/module-19-15-expiry-day-market-integrity)
16. [19.16Capstone: a research note on an Indian derivatives questionNot yet](/learn/path-19/module-19-16-capstone-research-note)
17. [TPath test, 30 questionsNot yet](/learn/path-19/module-19-16-capstone-research-note#pathTestSection)

Path 19 in reading time: 172 minutes over 16 modules

Minutes of reading per module, this one in amber. Source: RupeeCase Learn, Path 19.

    Explore next

## Put the module to work.

* [ToolOption payoff builderLegs on a dated Nifty chain, breakevens and charges](/learn/tools/payoff-builder)
* [Free module 12.6The real cost of a trade: STT, exchange fees, SEBI fee, GST and stamp duty7 min read](/learn/path-12/module-12-6-cost-of-an-fo-trade)
* [Free module 14.6Expiry and settlement: cash, physical, exercise and STT8 min read](/learn/path-14/module-14-6-expiry-and-settlement)
* [Free module 19.1What a backtest is, and five biases that ruin it9 min read](/learn/path-19/module-19-1-backtest-biases)
* [Free module 19.2Strategy metrics: CAGR, Sharpe, Sortino, drawdown and expectancy9 min read](/learn/path-19/module-19-2-strategy-metrics)
* [Free module 19.7Walk forward and out of sample testing10 min read](/learn/path-19/module-19-7-walk-forward-testing)

      Community

## Join my WhatsApp group.

      Scan the code, fillFill one short form, and join my WhatsApp group. Slides, sources, factsheets and the rebalance logs live there, and members join a daily Google Meet with me.

      New to RupeeCase? [Getting started](/getting-started) [See the terminal](/terminal)

        [Sign up for RupeeCase](https://invest.rupeecase.com/signup)
        [Join the WhatsApp group](https://forms.gle/C6HMtM1Z2GfeocQV7)

      [One form, one group](https://forms.gle/C6HMtM1Z2GfeocQV7)Scan with your phone camera

SSources

## Go to the source.
7 sources, NSE the most cited

The publisher of each source listed below. Source: Module 19.6 source list.
1. [NSE, derivatives reports and daily end of day files](https://www.nseindia.com/all-reports-derivatives) NSE
2. [NSE, equity derivatives contract specifications (European exercise, cash settlement, lot sizes)](https://www.nseindia.com/static/products-services/equity-derivatives-contract-specifications) NSE
3. [NSE, circular NSE/FATAX/73524 on securities transaction tax from 1 April 2026](https://nsearchives.nseindia.com/content/circulars/FATAX73524.pdf) NSE
4. [NSE, circular NSE/FA/73061 on transaction charges for equity derivatives from 1 March 2026](https://nsearchives.nseindia.com/content/circulars/FA73061.pdf) NSE
5. [SEBI, circular of 15 October 2026 on the closing auction session, market timings and settlement methodology for derivatives](https://www.sebi.gov.in/legal/circulars/oct-2026/review-of-certain-aspects-of-the-closing-auction-session-market-timings-and-settlement-methodology-for-derivatives-contracts_105293.html) SEBI
6. [SEBI, circular of 26 May 2025, final settlement day and expiry day for equity derivatives contracts](https://www.sebi.gov.in/legal/circulars/may-2025/final-settlement-day-expiry-day-for-equity-derivatives-contracts_94189.html) SEBI
7. Chan, E. P., Quantitative Trading, 2nd ed., Wiley, 2021 (the chapter on backtesting) Book

GTerms

## 4 terms from this module.
Cash settlementClosing a contract at expiry by paying the difference in rupees against the settlement price, with no delivery. Nifty options settle this way.
Parity forwardThe forward level implied by a call and put at one strike. It stands in for the future when a weekly contract has no future of its own.
[Ledger](/learn/glossary#ledger)The table of every trade a test makes, one line each, with entry, exit, result and charges.
Independent tradeA trade whose result does not move with another's. Overlapping trades do not count twice when asking how much evidence a record holds.
[All 230 terms in the glossary](/learn/glossary)

[Question people askWhere do I get historical option chain and F&O data in India?A short answer with a dated chart](/learn/questions/historical-option-chain-data)[Question people askHow do I backtest an option strategy in India, or in Python?A short answer with a dated chart](/learn/questions/backtest-option-strategy)[Related module12.6 The real cost of a trade: STT, exchange fees, SEBI fee, GST and stamp duty7 min, Beginner](/learn/path-12/module-12-6-cost-of-an-fo-trade)[Related module14.6 Expiry and settlement: cash, physical, exercise and STT8 min, Beginner](/learn/path-14/module-14-6-expiry-and-settlement)[Pillar guideDerivatives and Quant115 modules across paths 12 to 19](/learn/derivatives)

Education only, not investment advice, a research report or a recommendation to buy, sell or hold any security. RupeeCase (QC Alpha Technologies Pvt Ltd) is not registered with SEBI as an investment adviser or research analyst. Contracts and prices shown are for illustration only, come from NSE end of day files at least 30 days old, and are not recommendatory. Derivatives trading carries a high risk of loss.
