
NSE launched the Nifty200 Momentum 30 on 25 August 2020. Its price index closed that day at 12,114.53. The base was 1,000 on 1 April 2005, so the first 15.4 years of the series, a 12.1 times rise or 17.6% a year, were calculated after the fact by running the rule on old prices. The 6.1 years since launch are the only part that was not.
a year, 1 Apr 2005 to 25 Aug 2020, back calculated
NSE index closes, price index
a year, 25 Aug 2020 to 30 Sep 2026, live
NSE index closes, price index
a year, the last five years to 30 Sep 2026, live
NSE Indices factsheet, 30 Sep 2026
Every one of those numbers is real. Only the last two are out of sample. A back test is the minimum bar, not the evidence. The evidence is how a rule does on data it was not designed on, and the start date moves that answer by more than seven points a year.
5By the end you can
- Tell in sample, out of sample and walk forward apart, and fix the split first.
- Work out the best Sharpe ratio noise gives after N tries, the deflated Sharpe ratio and the minimum back test length.
- Say what three replication studies found.
- Name the Indian data traps: vanished firms, restated accounts, results timing, index membership.
- Cost a rebalance with impact cost and run any back test through a twelve question checklist.
2 terms this section turns on
Why back tests lie: the three sources of bias
In sample is the history used to design and tune a rule. Out of sample is history the rule never touched while it was built. Walk forward replays the real process: design on one window, trade the next, roll forward, and join the out of sample pieces.
Most strategies fail out of sample for three reasons that look like one problem, over fitting, but have different roots:
- In sample over fitting. Parameter tuning. Test 50 look back windows for a momentum signal and pick the best, and part of what you picked is noise.
- Back test snooping. Using the same history to build and to validate. Build on 2012 to 2022, tweak, then "validate" on 2012 to 2022, and you have run a second in sample test.
- Survivorship bias. Testing only on stocks that survived. A database of today's Nifty 500 members leaves out every company that was delisted, merged or collapsed, so the worst outcomes vanish.
Two more get their own sections: look ahead, using a number before it existed, and cost, the gap between a model trade and a market trade.
The best Sharpe in pure noise
Here is the single most useful calculation in this path. Suppose you test many strategies that have no edge at all, each over five years of data. Each one's measured Sharpe ratio is noise with a standard error of about 1 / √5 ≈ 0.45. How good does the best one look?
₹100 in Dynamic Asset Allocator became about ₹393 in the model
- 1 tried0.00
- 10 tried0.69
- 20 tried0.83
- 100 tried1.12
- 1,000 tried1.45
Expected best Sharpe ratio over a 5 year back test when no strategy has any edge. Simulation by RupeeCase: the average of the maximum of N independent standard normal draws, times 0.45. Real strategy variants are correlated, which lowers the numbers somewhat, but not the lesson.
Try a hundred variants and expect one to show a Sharpe above 1.1 by luck alone.
E[max] = (1-g) * Zinv(1-1/N)
+ g * Zinv(1-1/(N*e))
Noise bar = SE * E[max]
t = Sharpe * sqrt(years)

The research model: data snooping and multiple testing
Lo and MacKinlay (1990) showed that tests of asset pricing models go wrong when they are built from patterns already seen in the data, such as portfolios sorted on a characteristic found by searching. The bias can be large. White (2000) turned the problem into a test: his Reality Check bootstrap asks whether the best rule in a large universe beats a benchmark by more than the best of that universe would by chance. It needs the whole universe, not just the winner.
= 1 - (1 - a)^N
a = 5%, N = 20: 64%
a = 5%, N = 100: 99.4%
Bonferroni cut = a / N
t needed: N=20 3.02
N=100 3.48, N=1000 4.06
Read 3 more paragraphs, 186 words
Sullivan, Timmermann and White (1999) ran it on a classic case. An earlier study had found that 26 simple technical trading rules worked on daily US large cap index data ending in 1986. They widened the universe to 7,846 rules, used a century of daily data and applied the Reality Check. On the earlier study's sample the best rule survived. Then they took the next ten years, 1987 to 1996, untouched. The best rule was not statistically significant, and in futures data for the same years no rule outperformed.
Read that twice. The snooping correction passed, and untouched data still failed the rule. A fix for the number of tries does not replace data the rule has never seen.
Harvey, Liu and Zhu (2016) counted the tries across the field: 316 factors proposed up to 2012. With that many tests a t of 2.0 means little, and they argue a new factor should clear 3.0. Harvey and Liu (2015) apply it to a single Sharpe ratio: halving a back tested Sharpe is a rule of thumb, and the right cut grows with the number of tests.
The deflated Sharpe ratio and minimum back test length
Bailey and López de Prado (2014) built the number that does this for one strategy. The Deflated Sharpe Ratio, DSR, is the probability that the true Sharpe ratio is above zero after you account for the variants tried and their spread, the number of observations, and how far returns are from a normal curve.

z = (SR - SR0) * sqrt(T-1)
/ sqrt(1 - g3*SR
+ (g4-1)/4 * SR^2)
DSR = Normal CDF of z
- Monthly Sharpe: 1.2 / √12 = 0.3464. T = 60.
- Spread, monthly: 0.45 / √12 = 0.1299.
- E[max of 100] = 0.4228 × 2.326 + 0.5772 × 2.680 = 2.531.
- Luck bar: SR0 = 0.1299 × 2.531 = 0.3287 a month, 1.14 a year.
- Denominator: √(1 + 0.5 × 0.3464 + 0.875 × 0.1200) = 1.1306.
- z = (0.3464 - 0.3287) × √59 / 1.1306 = 0.12.
- DSR = Normal CDF of 0.12 = 0.55.
| Variants tried | Luck bar, annual | z | DSR |
|---|---|---|---|
| 1 | 0 | 2.35 | 0.99 |
| 10 | 0.71 | 0.96 | 0.83 |
| 100 | 1.14 | 0.12 | 0.55 |
| 1,000 | 1.46 | -0.52 | 0.30 |
| 100, over 10 years | 0.81 | 1.10 | 0.86 |
Illustration: annual Sharpe 1.2, monthly returns, 5 years unless stated, skew -0.5, kurtosis 4.5, spread of variant Sharpe ratios 0.45 a year (0.32 for 10 years). Bailey and López de Prado (2014) formula.

| Variants tried | Years needed, exact | Upper bound |
|---|---|---|
| 7 | 1.9 | 3.9 |
| 45 | 5.0 | 7.6 |
| 100 | 6.4 | 9.2 |
| 1,000 | 10.6 | 13.8 |
Years before the best of N noise strategies stops showing a Sharpe of 1 in sample. Bailey, Borwein, López de Prado and Zhu (2014), Theorem 3.1, computed by RupeeCase. Necessary, not sufficient.
Read 3 more paragraphs, 147 words
A worked case, with assumed inputs: 100 variants on 5 years of monthly returns. The best has an annual Sharpe of 1.2, skew -0.5 and kurtosis 4.5. The 100 results spread by 0.45 in annual Sharpe, which is what noise gives over 5 years.
A back tested Sharpe of 1.2 becomes a 55% chance that the rule has any edge; the usual bar is 95%. Found once, the same Sharpe is close to certain; found as the best of a thousand, it is worse than a coin toss.
The other half is how much history you need. Bailey, Borwein, López de Prado and Zhu (2014) call it the Minimum Backtest Length: for an in sample Sharpe of 1, the square of E[max of N] in years, bounded above by 2 ln N / SR². Their reading: with five years of data, no more than 45 independent variants.
After publication: what replication studies found
Three large studies ask whether published return patterns hold up. Their answers differ.
| Study | Tested | Found |
|---|---|---|
| McLean and Pontiff (2016) | 97 US stock return predictors | Returns 26% lower out of sample, 58% lower after publication |
| Hou, Xue and Zhang (2020) | 452 US anomalies | 65% fail a t of 1.96; 82% fail a t of 2.78 |
| Jensen, Kelly and Pedersen (2023) | 153 factors in 93 countries | Most replicate, in 13 themes |
Read 2 more paragraphs, 140 words
McLean and Pontiff read the 26% as an upper bound for data mining and the 32 points between 26% and 58% as the effect of investors trading on what they read. Decay was larger for patterns with bigger in sample returns. Hou, Xue and Zhang controlled for tiny stocks, and the anomalies that held were smaller than first reported. Jensen, Kelly and Pedersen used a Bayesian model; on their definition, 118 of 153 world factors are discoveries.
Both can be true. The first two ask whether every claimed pattern clears a cutoff in US data; the third asks whether the family works in many places. None is an India study; for India see Module 3.8. An old, simple pattern with a reason, seen in many markets, has earned more trust than a new one with a high back test.
The walk forward validation framework
The only valid way to test a strategy on history is to replay the real research and deployment process: design on a training window, test on a window you have not touched, move forward in time, repeat.
Two terms to hold on to from 5.5
- Design
Write the mechanism, choose a small set of variants, log them all.
- Tune
Pick the variant in the middle of a stable region, not the single best.
- Hold out, looked at once
The verdict. If it fails, stop; tuning here turns it into training data.
- Live data
The only fully clean test. Weigh it more per month than any back test.
Where this section sits in module 5.5
Read 2 more paragraphs, 130 words
Choose the window type before the test: rolling trains on the last N years and adapts faster, expanding keeps everything and is steadier. Leave a gap between training and test, because a 12 month momentum signal can put the same return on both sides.
A walk forward run gives one path. Bailey, Borwein, López de Prado and Zhu (2017) test many. Their method cuts the history into blocks and forms every balanced split into a training half and a test half; 16 blocks give 12,870 splits. In each, take the variant that was best in training and record its rank in the test half. The Probability of Backtest Overfitting is the share of splits where it lands below the median. With 100 variants of no edge it tends to 100%.
Worked example: a momentum rule, from idea to hold out
Say you want a rule that holds the top 20 Nifty 100 stocks by 12 month momentum, skipping the last month, rebalanced monthly. Mechanism first: investors under react to news, so trends persist. Then the plan: look backs of 9, 12 and 15 months, holdings of 20 and 30. Six variants, logged. N = 6.
Read 2 more paragraphs, 136 words
The results here are assumed, to show the process. On 2010 to 2018 all six beat the Nifty 100 TRI after costs, by similar margins, so the edge does not depend on one setting. You pick 12 months and 20 stocks because they sit in the middle, not because they won. On 2019 to 2022 it still beats the index, by less. On the 2023 onwards hold out it beats the index in some years and trails in others. That is a modest edge out of sample. If the hold out had collapsed, you would stop, not tune.
The log bought a low bar. With N = 6, the rough luck bar for 9 years is √(2 ln 6) / √9 = 0.63 in annual Sharpe. A blind search of 1,000 variants sets it at 1.24.
Survivorship and look ahead in Indian data
Agarwalla, Jacob and Varma at IIM Ahmedabad built the Indian factor library from January 1994 to December 2013. They counted 3,184 firms that stopped trading, 439 of them confirmed mergers; for the rest the cause is unknown, and some may have failed.
| Trap | What fixes it |
|---|---|
| Today's index list used for the past | The list as it stood at each review date |
| Delisted and merged firms dropped | Keep them to the last trade; count distress as a loss |
| March accounts used from 1 April | Lag by the reporting deadline, with margin |
| Restated figures in the extract | A snapshot taken at the time |
Read 3 more paragraphs, 282 words
They tested the worst case: any firm whose last traded price was below 50% of face value became a total loss. Over 20 years the effect was about 0.1 points a year on the size factor and 0.2 on value. Their reason is value weighting: most vanished firms were tiny, in the bottom two deciles by market capitalisation, many gone between 1996 and 2001. That result is about value weighted factors. An equal weighted small cap screen gives a vanished stock the same weight as a survivor, so measure the bias there before assuming it is small.
Look ahead is the second trap, and the same paper handles it. US research forms value portfolios in June, six months after a December year end. Most Indian firms close their books on 31 March, and the authors form portfolios in September, because Indian firms must hold their annual general meeting within six months of year end. SEBI's listing regulations, as notified on 2 September 2015, set quarterly results within 45 days and audited annual results within 60 days of year end: 30 May for March. Scoring a stock on March accounts from 1 April uses numbers that did not exist yet. Check the current regulations before relying on the day counts.
Restatement is the third: the paper notes its database updates company data retrospectively, so an extract pulled today can differ from what was known then. The fourth is the index list. NSE's Nifty200 Momentum 30 draws from the Nifty 200 at the time of each review, and broad index reviews use six months of data to January and July. A test that uses today's Nifty 200 list for 2012 has picked the survivors.

Costs, capacity and impact cost in mid and small caps
A model fills at a price. A market fills at a price that moves with your size. NSE measures this as impact cost: the mark-up paid, against the ideal price (the average of best bid and best ask), to trade a stated quantity. In NSE's toy order book a sale of 4,000 shares averages 3.43 against an ideal 3.75: (3.75 - 3.43) / 3.75 = 8.53%.
| Index | Stocks | Daily turnover, Rs cr | Per stock, Rs cr |
|---|---|---|---|
| Nifty 50 | 50 | 22,983 | 460 |
| Nifty Midcap 150 | 150 | 22,604 | 151 |
| Nifty Smallcap 250 | 250 | 22,278 | 89 |
NSE daily index files (ind_close_all), average of the 21 trading days of September 2026. Averages: the median stock trades less, and your smallest holding is the one that binds.
Read 4 more paragraphs, 212 words
NSE uses it as an entry test. A Nifty 50 stock must have traded at an average impact cost of 0.50% or less for 90% of observations over six months, for a portfolio of Rs 10 crore. For the Nifty 500 universe the test is an average of no more than 1% over six months. These are thresholds for index members, not a forecast of your cost.
Size is the real divider. NSE's daily index file reports turnover for each index; dividing by the number of stocks gives the average constituent:
A large cap book is about five times deeper per name than a small cap one. Two calculations show what that does. First, cost: every rupee traded pays the spread, the impact and the charges. A book that trades 120% of its value a year at an all in 0.4% loses 0.48 points a year; at 1.5%, as in a thinly traded small cap, 1.8 points (assumed inputs). Second, capacity: how many days it takes to trade your size without being most of the day's volume.
A back test that fills every order at the closing price at any size has assumed this away. That is how a small cap strategy looks excellent on paper and cannot be run at scale.

Economic intuition as the first filter
Before any back test there should be an answer to one question: why should this signal predict returns? Signals with a clear mechanism are far more likely to persist than signals found by mining data.
- Momentum rests on investors under reacting to information, so news takes months to be priced in. That is a structural feature of how people process information, not a temporary anomaly.
- Quality rests on good businesses compounding capital at above average rates, and markets underestimating how long that lasts. It is tied to the economics of competitive advantage.
- A ratio found by testing 500 ratios and keeping the best has no mechanism. It found noise, and the table above shows how good noise can look.
The decision rule: a strategy earns live money when it meets all three tests: (1) a clear economic mechanism written down before the back test, (2) a satisfactory walk forward result on genuinely held out data, after costs, and (3) robustness when its parameters move within a sensible range. Two out of three is not enough.

What live data adds
Even a careful hold out is still history you could have looked at. The only fully clean test is the future. A live record, however short, deserves more weight per month than any back test, and must be read with its start date. The opening example, taken apart:
| Period | Years | A year | Basis |
|---|---|---|---|
| Momentum 30, 1 Apr 2005 to 25 Aug 2020 | 15.4 | 17.6% | Back calculated |
| Momentum 30, 25 Aug 2020 to 30 Sep 2026 | 6.1 | 15.7% | Live |
| Nifty 200, same live dates | 6.1 | 13.9% | Live |
| Nifty 50, same live dates | 6.1 | 11.8% | Live |
NSE daily index files (ind_close_all): price index closes of 25 Aug 2020 (Momentum 30 12,114.53; Nifty 200 5,965.20; Nifty 50 11,472.25) and 30 Sep 2026 (29,518.95; 13,169.95; 22,620.45); base 1,000 on 1 Apr 2005. Launch date from the NSE Indices factsheet of 30 Sep 2026. Price only, no dividends.
Read 2 more paragraphs, 148 words
The live record is not far below the back calculated one, and it beat the Nifty 200, the index it draws from, by 1.8 points a year. That is six years. The factsheet's five year figure is 8.32% against 15.7% from launch: the same live record moves by 7.4 points with the start date, and the start date should not be chosen after the fact.
Markets supply hard tests on their own schedule. The Nifty 50 closed at 26,328.55 on 2 January 2026, its highest close in NSE's daily files from September 2025. On 30 September 2026 it closed at 22,620.45, 14.1% lower. The Nifty Smallcap 250 fell to 14,232.85 on 23 March 2026, rose to 18,527.20 on 8 September and closed at 17,798.80 on 30 September: 25.1% above the low, 3.9% below the high. A rule frozen before 2026 has met both, and was fitted to neither.
Paper trading: what it adds and what it leaves out
Paper trading runs the frozen rule on live data without real money. It tests your data feed, your timing and whether you follow the rule. RupeeCase's invest sheet opens on Practice, which follows a strategy's real rebalances at live prices with no order at a broker. It fills at the price asked, so it does not measure spread, slippage or partial fills. Module 10.4 covers the hand over.
MythA long, smooth back test proves a strategy works.
FactIt proves the rule fitted the past. Without a reason, a logged search and data the rule never saw, a smooth curve is exactly what over fitting produces.
Read one more paragraph, 60 words
A short run says little about edge. The t statistic is the Sharpe ratio times the square root of the years, so a true Sharpe of 1 needs (2.0 / 1)² = 4 years of live data to reach a t of 2, and a true Sharpe of 0.5 needs 16. Three months of paper trading shows process, not edge.
A checklist for any back test you see
Twelve questions for any factsheet, pitch or your own work.
| Ask | Red flag |
|---|---|
| 1. How many variants were tried? | No number is given |
| 2. What is the reason, written first? | It appears after the result |
| 3. Which dates were held out, looked at once? | None, or used twice |
| 4. Do nearby settings work too? | One lone peak |
| 5. Is the Sharpe deflated for N and years? | Raw Sharpe under the luck bar |
| 6. Is membership as of each date, delisted stocks kept? | Today's list for old years |
| 7. Were accounts public on the date used? | Year end data used at once |
| 8. Are costs charged by trade size? | "Excludes costs", or a flat figure |
| 9. How many days to trade at a set share of volume? | Capacity not stated |
| 10. Does it survive without its best year? | One year carries it |
| 11. Is there a live record, with its start date? | Start date chosen late |
| 12. Are model and live figures dated and labelled? | Mixed in one curve |
The Derivatives School applies the same tests to trading rules: What a backtest is, and five biases that ruin it, Backtest overfitting: deflated Sharpe, PBO and multiple testing and Backtesting options on Indian data. Two short answers go with them: Must a backtest include STT and costs? and How do I use Monte Carlo to test strategy risk?
Common mistake: re optimising after a bad patch
The most damaging habit is re fitting a strategy every time it has a bad quarter. Each re fit uses the recent loss as training data, so the strategy chases the last regime and the back test gets prettier every time. It is also another trial: the N in the luck bar rises with every one.
Decide in advance how often a strategy may be reviewed, say once a year, and what would justify a change: a structural reason, not a drawdown inside its historical range. Between reviews, the rule runs as written.
How this shows up in RupeeCase
Machine learning is used in RupeeCase research to search the design of each strategy, which signals, how many names, how often to rebalance, with every candidate tested out of sample. The chosen rule is then frozen and published, so the live strategy cannot quietly re fit itself. Each factsheet states its back test window, from 9 Jul 2021, its price source, NSE BhavCopy, and the costs deducted: brokerage, STT, exchange charges and GST. Every rebalance is published on its date. All figures are model, back tested; the track record page keeps every model curve and graded call in one place, and the Allcap factsheet shows the full method.
Key takeaways
- A back test is the minimum bar; out of sample results are the evidence, and a live number needs its start date.
- The best of 100 useless five year back tests shows a Sharpe of about 1.1 by luck.
- A Sharpe of 1.2 that was the best of 100 variants deflates to about 0.55, not 0.95.
- In Indian data, check vanished firms, results timing, restated figures and index membership at the time.
- Impact cost and capacity fall hardest on small caps.
- A strategy needs a written reason, a clean walk forward result after costs, and stable parameters.
Questions readers ask
What is the difference between in sample and out of sample?
In sample is the data used to design and tune a strategy. Out of sample is data the strategy never saw during design. Only out of sample results say anything about how a rule might behave in the future, and even they are not a promise.
Why do live returns usually come in below the back test?
Selection bias, costs and changing markets. The strategy you see is usually the best of several, so its back test is flattered; real trading costs more than models assume; and markets drift.
What is a deflated Sharpe ratio in plain words?
The probability that a strategy's true Sharpe ratio is above zero, once you account for how many variants were tried, how many observations there are and how lopsided the returns are. A raw 1.2 can deflate to 0.55 when it was the best of 100 tries.