---
title: "Backtest Biases in Indian Options: Five That Ruin One"
description: "What a backtest is and how look ahead, survivorship, overfitting, cost and sample bias distort it, shown on dated NSE data and the STT rates by date."
source_url: "https://www.rupeecase.com/learn/path-19/module-19-1-backtest-biases"
---

[Path 19 1 of 16](/learn/path-19/)What a backtest is, and five biases that ruin it[Next 19.2](/learn/path-19/module-19-2-strategy-metrics)

Monday 30 Mar 2026. Nifty closed at 22,331.40, 15.2% under its close of 26,328.55 on 2 Jan. A [backtest](/learn/glossary#backtest) run today sees that whole fall. A trader on 2 Feb 2026 saw none of what came after. The gap between what the test knows and what the trader knew is where most backtests go wrong. A backtest replays a rule on past data to see what it would have done. It tests a hypothesis and forecasts nothing, and each of the five biases below makes the answer look better than it was. This lesson names them, shows three on dated NSE data and says how to guard against each. Nothing here is a strategy to run, and nothing is a view on where Nifty goes.

3By the end you can

1. Say what a backtest can and cannot show, and how to run a free end of day one on NSE files.
2. Name the five biases: look ahead, survivorship, overfitting, cost and fill, sample and regime.
3. Price a trade at the STT rate of its own date, and read the result of a test with that in mind.

Watch in the terminal: why do the hero, key figure and XIRR differ? A short tutorial on sample data.

## The idea, plainly

### What is a backtest?

Write the rule first, in plain words: what it trades, when it enters, how much it risks and when it exits. Feed it the data as it stood on each date, record every trade with its costs, and total the result. A backtest can disprove a rule cheaply. It can rarely prove one, because the past is one path and the person running the test already knows how it ended. The biases are the ways that knowledge leaks in. How to measure the result is the subject of [strategy metrics](/learn/path-19/module-19-2-strategy-metrics).

Each stage of a backtest has its own bias

Data brings survivorship and rule changes, the signal brings look ahead, the fill and the costs bring the cost bias, and judging brings overfitting and a small sample. Source: RupeeCase illustration of a backtest pipeline. As of 17 Oct 2026.

### How do I backtest an option strategy for free in India, or in Python?

NSE publishes its end of day F&O files, with each contract's settlement price, volume and open interest, on its [reports page](https://www.nseindia.com/all-reports-derivatives) at no charge. A short Python script reads one day's file, rebuilds the option chain and applies the rule, and a loop runs it over dates. The free files cannot give the intraday price or the bid and ask, so every fill in such a test is a settlement or a close. That limit is bias four below. Keep three things beside the code: the date of each file, the rule as written before the first run, and a table of costs by date.

### What is look ahead bias?

It is using information that did not exist when the trade would have been placed. The classic form is a rule that reads the day's close and trades at that same close. End of day files appear only after the market shuts, so a rule that reads a day's open interest can trade no earlier than the next session. The high and low of the day, final settlement figures and revised data are off limits too. The guard is mechanical: lag every input by one bar and check the timestamp of each. A result that looks too good often fails this check first.

### What is survivorship bias?

It is testing only what still exists. Today's list of stocks with futures and options leaves out those that dropped out, so a test on it flatters any rule that picks stocks. SEBI revised the entry and exit criteria for stock derivatives in Aug 2024, so the list moves. Contracts end as well: the BANKNIFTY weekly contracts expired for the last time on 13 Nov 2024, and no later file holds one. A test must use the list and the contracts as they stood on each date, and say what it did with those that vanished.

The term this section turns on: Survivorship bias

From the module glossary; every term is in the Learn glossary too. Source: Module 19.1, What a backtest is, and five biases that ruin it.

### What are overfitting and data snooping?

Overfitting fits the rule to the noise of one sample. Try many versions of a rule on the same data and one will look good by luck. If twenty useless rules are each tested at the usual five percent level, the chance that at least one looks significant is 64.2 percent when the tests are independent. The chart shows how fast it climbs: 5.0 percent for one rule, 22.6 for five, 40.1 for ten and 92.3 for fifty. The guards: write the rule before testing, count every version tried and not only the winner, keep a stretch of data the rule never saw, and ask whether it has a reason to work.

Test enough rules and one will pass by luck

Plain arithmetic for independent tests: the chance that no rule passes shrinks with every rule added, and the bar shows the rest. It is why the count of versions tried matters as much as the winner. Source: RupeeCase arithmetic, no market data. As of 17 Oct 2026.

### Must a backtest include STT and costs?

Yes, by date, and the costs are more than STT. STT is charged on the premium of a sold option, the exchange charges a fee on every trade, SEBI takes a turnover fee and GST sits on the exchange charge. Brokerage and [slippage](/learn/glossary#slippage) come on top. The rates change. STT on a sold option's premium was 0.0625% from 1 Apr 2023, 0.10% from 1 Oct 2024 and 0.15% from 1 Apr 2026. A test that spans those dates with one rate misprices every trade. At the three rates the STT on one sale is Rs 5.29, Rs 8.47 and Rs 12.70, as the chart shows.

The same sale paid more STT at each rate change

One lot of 65 units of the 24,000 put sold at 130.25 a unit, premium Rs 8,466. Only the STT rate differs between the bars. Source: NSE end of day data and NSE STT circulars, computed by RupeeCase. As of 2 Feb 2026.
Read one more paragraph, 42 words
SEBI's August 2026 study of FY26 shows what is at stake in aggregate. Among individual traders, 87.7% made a net loss after costs and 82.1% before them, and transaction costs ran to about Rs 25,000 crore a year in FY25 and FY26.

### What are sample bias and regime bias?

A window with one crash holds one lesson, and a window with none holds none. The 20 day realised volatility of Nifty ran from 5.2% to 29.5% within the 300 sessions in the files. The rules change as well. The Nifty lot was 75 units in mid 2025 and 65 from January 2026. The Nifty expiry moved from Thursday to Tuesday on 1 Sep 2025. From 7 Dec 2026 the expiry settlement price becomes a volume weighted average over the last thirty minutes of trading, and for expiries before that date it is the index close. A test must carry the rule in force on each date.

One rule meets calm and stormy months, not one market

Twenty day realised volatility of the Nifty 50, annualised, from daily closes. A rule tuned on the quiet stretch meets the spike with no warning. Source: NSE end of day data, computed by RupeeCase. As of 15 Sep 2026.
Model, not market data

A short sample of a seller shows the wins and misses the tail

Each bar is the total, in lakh of rupees, for one lot over 20 weeks. Prices are fair, so nobody starts with an edge. The losses come from the weeks the window rarely contains. Inputs: one lot of 65 units of the Nifty 22,500 put sold at its settlement premium of Rs 12.65 a unit on 10 Jun 2026, expiry 16 Jun 2026; the forward 23,229.26 and the option's own implied volatility 16.16% over 6 calendar days; the index at expiry follows a lognormal curve around the forward; 20 weeks; before costs and interest. Source: RupeeCase model, inputs from NSE end of day data. As of 10 Jun 2026.
Read one more paragraph, 60 words
A seller of far options is the sharpest case. In a model with fair prices, the seller of a far Nifty put wins 19 weeks in 20, and the tail week that gives it all back is expected only 0.7 times in that window. A typical sample of that length meets none, so its record looks like steady gains.

## Worked example: one sold put, two sets of rates

Take the Nifty 24,000 put of the March expiry on 2 Feb 2026, settled at 130.25 a unit. One lot of 65 units sold at that price brings in Rs 8,466. A test that fills at the settlement price books exactly that. The table prices the statutory charges of the sale at the rates in force that day and at the rates from 1 Apr 2026.

| One sold lot, rupees | Rates of Oct 2024 | Rates from Apr 2026 |
| --- | --- | --- |
| STT on the premium | 8.47 | 12.70 |
| Exchange charge | 2.97 | 3.01 |
| SEBI turnover fee | 0.01 | 0.01 |
| GST on the exchange charge | 0.53 | 0.54 |
| Statutory total | 11.97 | 16.26 |
| Share of the premium | 0.14% | 0.19% |

Read one more paragraph, 110 words
The total rose 35.8% across the two columns, yet it stays a small share of the premium, 0.19%, for a trade held to expiry. Brokerage and slippage are larger. An assumed slippage of one rupee a unit costs Rs 65.00 on one lot, 4.0 times the statutory total at the new rates. The fill is the largest assumption of all. A strike that traded a handful of contracts gets a settlement price that is not the price of a trade, so a test that fills there trades at a price that never stood as an order. The cost lesson is in [the real cost of an F&O trade](/learn/path-12/module-12-6-cost-of-an-fo-trade).

## The common mistake

The belief: My backtest looks great, so the strategy works. Run it through the five stages. Did the signal use anything unknown at the time? Does the list of stocks or contracts include what has vanished? How many versions were tried before this one, given that twenty are enough for a lucky pass in 64.2 percent of cases? Were the costs those of each date, and was the fill a trade or a settlement? Did the window hold more than one regime? A good curve that passes all five is a reason to test further, on data the rule has not seen. SEBI now allows only registered advisers, research analysts and empanelled algo providers to state past performance, and only as risk and return figures verified by a recognised agency, operating since 4 May 2026. A backtest on a screenshot is not that.

Watch in the terminal: which numbers am I looking at? A short tutorial on sample data.

## Key takeaways

* A backtest tests a hypothesis. It does not forecast anything.
* Look ahead bias is a timing error: lag every input by one bar.
* Test the list and the contracts as they stood on each date.
* Count every version tried. Enough useless rules will pass by luck.
* Costs have rates by date, and a settlement price is not a fill.
* A window with no crash tells nothing about crashes.

Two terms to hold on to from 19.1

From the module glossary. Source: Module 19.1, What a backtest is, and five biases that ruin it.
**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 What a backtest is, and five biases that ruin it cover?A backtest knows how the story ended. Five ways that knowledge leaks into a test, and a guard for each. It works through The idea, plainly, Worked example: one sold put, two sets of rates, The common mistake, Key takeaways. It is module 19.1 of Path 19, Algo, HFT and Backtesting, about 9 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, 2 Feb 2026, 30 Mar 2026 expiry.

[Open the f&o costs and stt](/learn/tools/fo-cost-calculator?chain=NIFTY_2026-02-02_2026-03-30&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.1

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 1 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#quiz)
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)
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 12.7Position sizing and risk of ruin for F&O beginners8 min read](/learn/path-12/module-12-7-position-sizing-and-risk-of-ruin)
* [Free module 19.2Strategy metrics: CAGR, Sharpe, Sortino, drawdown and expectancy9 min read](/learn/path-19/module-19-2-strategy-metrics)
* [Free module 19.6Backtesting options on Indian data11 min read](/learn/path-19/module-19-6-backtesting-options)
* [Free module 19.13Backtest overfitting: deflated Sharpe, PBO and multiple testing11 min read](/learn/path-19/module-19-13-backtest-overfitting)

      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.
9 sources, SEBI the most cited

The publisher of each source listed below. Source: Module 19.1 source list.
1. [SEBI, Profitability of Individual Traders in the Equity Derivatives Segment, FY25 to FY26 (August 2026)](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) SEBI
2. [NSE, circular NSE/FATAX/73524 on securities transaction tax from 1 April 2026](https://nsearchives.nseindia.com/content/circulars/FATAX73524.pdf) NSE
3. [NSE, circular NSE/FA/73061 on transaction charges for equity derivatives from 1 March 2026](https://nsearchives.nseindia.com/content/circulars/FA73061.pdf) NSE
4. [NSE, derivatives reports: end of day F&O files](https://www.nseindia.com/all-reports-derivatives) NSE
5. [SEBI, circular of 30 August 2024, review of eligibility criteria for entry and exit of stocks in the derivatives segment](https://www.sebi.gov.in/legal/circulars/aug-2024/review-of-eligibility-criteria-for-entry-exit-of-stocks-in-derivatives-segment_86373.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. [SEBI, circular of 3 August 2026, enrolment with PaRRVA for verified past performance](https://www.sebi.gov.in/legal/circulars/aug-2026/extension-of-timeline-for-enrolment-with-parrva-as-specified-in-sebi-circular-no-ho-38-14-4-2026-mirsd-pod-i-10557-2026-dated-april-29-2026_103314.html) SEBI
8. [Bailey, D. H., Borwein, J. M., Lopez de Prado, M. and Zhu, Q. J., Pseudo-Mathematics and Financial Charlatanism, Notices of the AMS, 2014](https://doi.org/10.1090/noti1105) Paper
9. Chan, E. P., Algorithmic Trading, Wiley, 2013 (the chapter on backtesting and its pitfalls) Book

GTerms

## 5 terms from this module.
[Backtest](/learn/glossary#backtest)A replay of a written rule on past data to see what it would have done. It tests a hypothesis and does not forecast.
Look ahead biasUsing information in a test that did not exist at the time of the trade, such as a close used to trade at that same close.
[Survivorship bias](/learn/glossary#survivorship-bias)Testing only the stocks or contracts that still exist, which leaves out those that dropped out and flatters the rule.
OverfittingFitting a rule to the noise of one sample, so it looks good there and fails on new data. Trying many versions makes it likelier.
[Slippage](/learn/glossary#slippage)The gap between the price a test assumes and the price a trade gets, in rupees a unit.
[All 230 terms in the glossary](/learn/glossary)

[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)[Question people askWhat are overfitting, look ahead bias and survivorship bias?A short answer with a dated chart](/learn/questions/overfitting-and-biases)[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 module12.7 Position sizing and risk of ruin for F&O beginners8 min, Beginner](/learn/path-12/module-12-7-position-sizing-and-risk-of-ruin)[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.
