A walk-forward efficiency of 1.0 is most easily produced by a weak in-sample result

The short answer

Walk-forward analysis re-fits a system on a training window, scores it on the untouched window immediately ahead, then steps forward and repeats. Walk-forward efficiency divides the second result by the first. The trouble is structural: the in-sample result is the denominator, so the cheapest route to a flattering ratio is a weak optimisation, not a strong forward result. Hold the forward result at 8 per cent annualised, and an in-sample result of 40 per cent scores 0.20 while one of 5 per cent scores 1.60. Run on 1,164 trading days of real exchange data, one unchanged strategy reported efficiencies from -0.21 to 0.79 across 96 choices of window. And on those returns with their order shuffled away, where an edge is impossible, a single fold still cleared 1.0 35 per cent of the time.

Every figure below was computed in the build script for this page, from the exchange file set on disk or a procedure run there. Where a figure comes from a simulation it is called one, with its parameters stated.

What the procedure does, and what it is protecting against

Optimising a strategy on a stretch of history and reporting how it did on that stretch is not a test. It is a description of the search. The winning parameter won partly because it suited the period and partly because something had to win, and from inside the period those components cannot be separated.

A holdout answers that by hiding a slice from the optimiser and scoring on it afterwards. It works once, and it answers a narrow question: whether one fit survived one stretch. Score a trend rule on a calm year and it looks broken. Score it on a trending year and it looks inspired.

Walk-forward replaces the single split with a sequence. Fit on a training window, score on the window immediately after it, advance both by a step, fit again on fresh data, score again on the next unseen stretch. The scored windows are joined end to end into one record.

How a rolling walk-forward steps through a price history Four stacked rows, each shifted right of the one above. In every row a long gold block marks the training window where parameters are optimised, and a short green block immediately after it marks the testing window where those parameters are scored without further fitting. The green blocks from all four rows are then joined end to end at the bottom into a single continuous record, which is the only part of the history that was never optimised on. One pass of a rolling walk-forward The training block moves. The block scored is always the one that has not been touched yet. optimise herescorefold 1optimise herescorefold 2optimise herescorefold 3optimise herescorefold 4 record The out of sample record is stitched from test windows only. It is shorter than the history it came from. Time runs left to right. Nothing to the right of a gold block was visible when that block was fitted.
The mechanism. Each fold re-fits on recent history and is marked on the stretch immediately after, so the scored record holds only data unseen at the moment of fitting.

Two things improve. The scored record is longer than a single holdout gives, and it spans several market conditions. More importantly the object under test changes. A holdout tests a parameter set. A walk-forward tests a procedure, asking whether re-fitting on recent history produces parameters that work in the period after. That is what a live system does.

What it does not do is make the result proof. The optimiser never saw the test windows, but the researcher does, and the researcher is inside the loop. Inspect a walk-forward record, then change the strategy family, the cost model or the window lengths, and that record has entered the fitting. Walk-forward stops a parameter set memorising a period. It cannot stop a person running the procedure repeatedly and keeping the run they liked.

The ratio, and the number it divides by

Walk-forward efficiency compresses the exercise into one figure: out-of-sample performance divided by in-sample performance, both annualised so windows of different lengths compare. Around 1.0 means the forward result matched the fitted one. Below about 0.5 means most of what the optimiser found did not survive. Above 1.0 means the system did better forward than on the data it was tuned to.

That last reading is where the trouble starts. It is stated as though the only way to raise the ratio is to improve the numerator. The denominator is equally available.

Walk-forward efficiency against the in-sample result it divides by A curve that falls steeply from the left and flattens to the right. The out-of-sample result is held fixed at eight per cent annualised while the in-sample result varies along the horizontal axis. When the in-sample result is small the ratio is very large, and when the in-sample result is strong the same unchanged out-of-sample result scores below one. The shaded band on the left marks the region where the divisor is too small for the ratio to carry meaning. The same out of sample result, scored against different training results divisor too small 1.0 0.20.30.50.81.01.64.0 0.5 pc 10 pc 25 pc 40 pc In-sample annualised result, the denominator Out of sample fixed at 8 per cent annualised throughout. Nothing about the forward result changes across this curve.
The asymmetry, drawn. A ratio above one is reached far more cheaply by weakening the training result than by strengthening the forward one, and the ratio alone cannot tell you which happened.
One unchanged out-of-sample result of 8 per cent annualised, scored against different training results. Illustrative figures.
In-sample annualised, per centOut-of-sample, per centEfficiencyHow it reads
40.08.00.20a failure
25.08.00.32a failure
16.08.00.50acceptable
10.08.00.80acceptable
8.08.01.00a pass
5.08.01.60a pass
2.08.04.00remarkable
0.58.016.00remarkable

Read the last column down. The same forward performance is a failure at the top and remarkable at the bottom, and nothing about it changed. What changed is how much the optimiser found, and the ratio rewards finding less.

This is not a hypothetical route to a good number. It is the easiest one, and several ordinary research choices take it unintentionally. Narrowing the parameter grid lowers the best in-sample result. Adding costs lowers it. Choosing a training window over which the strategy family works poorly lowers it. Each is defensible, and each raises efficiency while making the system no better.

The degenerate case deserves naming. As the in-sample result approaches zero the ratio approaches infinity, and past zero the sign flips: a system that lost money in training and lost money forward reports a positive efficiency, because a negative divided by a negative is positive. In the control runs below, 1 per cent of folds were negative in both windows, and every one passes on the sign.

A walk-forward on real Indian data, run here

The series used below is an equal-weighted basket of the 200 most heavily traded stocks in the exchange cash file, over 1,164 trading days from 2022-01-03 to 2026-09-18. It returned 18.5 per cent annualised at 16.7 per cent volatility. Daily returns use each stock's close against its own adjusted previous close, so splits do not appear as one-day collapses. One caveat belongs in the text, not a footnote: the basket requires a full quote history, so it holds only names traded throughout. That is a survivorship filter, and it makes the basket kinder than the market was.

The strategy family is deliberately dull: long when a fast moving average of the basket sits above a slow one, flat otherwise, with 72 combinations forming the search grid. Costs of 10 basis points one way are charged on every change of position. The signal read at one close sets the next day's position, so no day is traded on information from inside itself. The base configuration trains on 250 days, tests on the 60 after it, and steps 60, giving 13 folds.

Walk-forward folds, 250-day training and 60-day testing, on the real basket. Annualised percentages.
FoldTest windowLengths chosenIn-sampleOut-of-sampleRatio
12023-07-04 to 2023-09-2710 and 2027.749.91.80
22023-09-28 to 2023-12-2710 and 6031.044.01.42
32023-12-28 to 2024-03-2225 and 5038.628.40.74
42024-03-26 to 2024-06-242 and 8047.271.21.51
52024-06-25 to 2024-09-183 and 8051.525.70.50
62024-09-19 to 2024-12-1620 and 12045.2-18.0-0.40
72024-12-17 to 2025-03-123 and 8030.9-5.2-0.17
82025-03-13 to 2025-06-123 and 8016.735.72.14
92025-06-13 to 2025-09-0813 and 5015.7-12.7-0.81
102025-09-09 to 2025-12-0415 and 306.717.42.59
112025-12-05 to 2026-03-0420 and 12012.1-5.2-0.44
122026-03-05 to 2026-06-0425 and 4011.7-26.6-2.28
132026-06-05 to 2026-08-288 and 202.90.90.31

Averaged across folds the in-sample result was 26.0 per cent annualised and the out-of-sample result 15.8 per cent, an aggregate efficiency of 0.61. Before reading that number, notice how far the ratio moved fold to fold, and that the lengths the optimiser selected changed between folds too. A single aggregate figure hides both.

The window triple is three more parameters

Walk-forward is presented as the cure for parameter search, and it introduces three parameters of its own: how long to train, how long to test, how far to step. Nothing in the method fixes them. They are chosen by the researcher, the way any other parameter is chosen, by trying combinations and keeping the best answer.

Walk-forward efficiency across 96 window configurations on one unchanged strategy A horizontal scale of walk-forward efficiency with one dot for each combination of training length, testing length and step. The dots are spread widely across the scale even though the strategy, the data and the parameter grid never changed. The lowest and highest dots are marked. One strategy. One data set. 96 choices of training length, testing length and step. Every dot is the walk-forward efficiency the same system reports under a different window triple. -0.20.00.30.50.71.01.2 worst -0.21 best 0.79 Report the right-hand dot and the system looks to have carried forward. Report the left-hand one and it reads as a failure.
Computed on the real basket described above. The training length, the testing length and the step are parameters like any other, and can be searched like any other.
The same strategy and the same data under different window triples. 96 configurations computed; five shown, spanning the range. Annualised percentages.
Training, testing, stepFoldsIn-sampleOut-of-sampleEfficiency
500, 120, 120430.5-6.3-0.21
375, 30, 154325.79.40.36
150, 20, 108825.212.40.49
120, 90, 901028.016.70.60
180, 120, 120725.820.50.79

Across 96 configurations the efficiency ranged from -0.21 to 0.79, with a median of 0.49. The best configuration reports roughly 1.6 times the median. The strategy did not change, the data did not change, the parameter grid did not change. Only the shape of the windows changed, and that shape is a free choice nobody is required to disclose.

That is the reimportation. The procedure was adopted to stop a researcher selecting a parameter set that suited a period, and it hands back fresh parameters that can be selected to suit a period. The second search is harder to see because it looks like a methodological choice, and those are rarely reported with the alternatives that were dropped. The only defence is procedural: fix the lengths before any result is seen, justify them by the horizon the system trades, and write that down first.

Anchored or rolling, and when each is the wrong choice

A rolling window keeps a fixed length and discards the oldest data as it advances. An anchored window fixes its left edge at the start of the history and grows. Both are legitimate. They encode different beliefs, and each is wrong in a specific way.

Rolling against anchored training, 60-day test windows, on the real basket. Annualised percentages.
Training lengthRolling out-of-sampleRolling efficiencyAnchored out-of-sampleAnchored efficiency
250 days15.80.6111.90.41
375 days9.80.386.30.22
500 days-3.9-0.15-7.0-0.25

An anchored window assumes the relationship is stable and more history is therefore better. Where that holds it is the stronger design: the fit rests on a larger sample and is less easily pushed around by one unusual quarter. Where it fails, the window never forgets. A rule change from two years ago stays in the training set permanently, dragging the fit toward a market that no longer exists.

A rolling window assumes the opposite, and its failure is the mirror image. A short window may not hold enough observations for a small effect to be visible at all, so the optimiser fits noise and the walk-forward faithfully reports that the noise did not persist. It also discards the rare periods that show how a system behaves under stress.

Neither choice is settled by running both and keeping the better number, which is the fourth free parameter hiding behind the other three. It is settled by a view on whether the thing being measured is stable, and that comes from the market's institutional history rather than the backtest.

What a strategy with no edge scores on this test

A measurement with no control is a number, not a finding. The control here is what the same procedure reports when there is definitely nothing to find.

So take the same real daily returns, keep every one, and destroy their order by shuffling. The distribution is untouched: same mean, same variance, same fat tails, same worst day. What is gone is the sequence, the only thing a trend rule can exploit. Repeating the shuffle 500 times, fixed seed, same windows, gives the distribution of what the ratio produces from nothing.

The efficiency scores produced by a strategy that cannot have an edge Two overlaid histograms from 500 runs on the same real returns with their order destroyed by shuffling. The grey distribution of individual fold ratios is very wide and a large share of it lies above one, the value normally read as a pass. The narrower gold distribution is the same runs aggregated across all folds, showing that averaging many folds tightens the reading considerably. A dashed marker shows where the run on the real unshuffled series falls. 6,500 folds of walk-forward on returns whose order was destroyed Same distribution, same fat tails, no sequence left for a trend rule to exploit -2-10123 35 pc of single folds clear 1.0 real data: 0.61 one fold on its own aggregated over 13 folds Walk-forward efficiency. Values beyond the axis are drawn at the edge. Simulation: real daily returns, order shuffled, fixed seed, 500 trials, 250-day training and 60-day testing windows throughout.
The control. A system that cannot have an edge scores above the conventional pass mark on a single fold roughly 35 times in 100, and the spread only narrows if many folds are averaged, which is exactly what a short history denies you.
Efficiency from 500 simulated runs on order-shuffled real returns, fixed seed. Left column reads one fold alone, right column the 13 folds aggregated.
Position in the distributionA single foldAggregated, 13 folds
5th percentile-2.420.03
25th percentile-0.520.36
median0.310.53
75th percentile1.610.70
95th percentile6.230.90

Read the left column first, because it is what most published walk-forwards report. A single fold of a system that cannot have an edge scored above 1.0 in 35 per cent of cases and above 0.7 in 41 per cent, with a 95th percentile of 6.2. Nothing was there to be found.

The right column shows the only real defence, which is folds. Averaging 13 of them pulls the distribution in hard: the middle ninety per cent of outcomes narrows from a span of 8.6 to one of 0.87, and the share clearing 1.0 drops to 3 per cent. That is the genuine value of walk-forward, and it is entirely a sample size effect, which is what a short history takes away.

Share of no-edge runs reaching each efficiency level, per cent, by how much data the design was allowed
Efficiency reportedOne fold6 folds, recent slice13 folds, full history
at or above 0.3506581
at or above 0.5454956
at or above 0.7413525
at or above 1.035163

The middle column is the Indian case rather than a hypothetical. Restricting the same procedure to the most recent 620 trading days, about as close to one structural regime as this market allows, leaves 6 folds, and the share of no-edge runs clearing 1.0 goes back up to 16 per cent. Shortening the history to avoid a rule change and lengthening it to gain power are the same dial turned in opposite directions.

The mechanism is visible in the same runs. The ratio and its divisor move against each other.

Across 6,500 simulated folds: the in-sample result, and the fold ratio it produced. Ratio capped at 20 so one near-zero divisor cannot dominate.
In-sample annualised, per cent, by fifthMedian ratioShare clearing 1.0, per cent
0.5 to 11.51.2753
11.5 to 18.00.5743
18.0 to 24.20.3335
24.2 to 32.00.2327
32.1 to 72.40.1418

The correlation between the in-sample result and the fold ratio across those 6,297 folds is -0.22. Folds where the optimiser found least reported the highest efficiency, by a factor of about 9 between the weakest fifth and the strongest. The underlying data did not differ: it was the same shuffled noise throughout. This is the asymmetry of the opening section, measured rather than argued.

Set the real run against that. The aggregate efficiency on the unshuffled basket was 0.61, about the 62nd percentile of what the shuffled series produces. It is inside the range, not outside it. That does not establish the strategy is worthless. It establishes that this test, on this much data, did not distinguish it from a system with no exploitable structure.

The ratio never mentions what you could have done instead

One more thing the figure leaves out, and it may be the largest. Walk-forward efficiency compares a system to itself. It says nothing about whether it beat the thing it was trading.

The basket itself returned 18.5 per cent annualised over this window. The walk-forward system returned 15.8 per cent across its out-of-sample windows while holding a position on 78 per cent of those days, and being long that share of the time and doing nothing else would have earned about 23.3 per cent over the same windows. A reader given only the efficiency figure of 0.61 recovers none of that, and the ratio would read the same had the basket fallen.

This also explains how the control was built. Shuffling keeps the drift. A long-or-flat rule on a drifting series earns roughly the drift multiplied by the share of time it is long, with no skill involved. Much of what efficiency credits to a trend system on a rising market is that arithmetic, and the ratio cannot separate the two because it never looks at the instrument.

The market moved underneath the window

Everything above is general. What is specific to India is that the object being walked forward over has been rebuilt repeatedly and recently, so a window long enough to fit is one that crosses a change in the rules it is fitted under.

The most recent change is the one least likely to appear in anything written before this month, and it touches the most used input in retail research. Since 3 August 2026, the closing price of an Indian stock that has derivatives contracts on it is no longer a volume-weighted average of the last thirty minutes of continuous trading. Continuous trading for those stocks stops at 3:15 pm, a closing auction runs to 3:35 pm, and the price struck there is the close. Stocks without derivatives kept the old method and still close on the 3:00 pm to 3:30 pm average. The auction reference price is the average over 3:00 pm to 3:15 pm, with a band of plus or minus 3 per cent.

Read that against a backtest. The liquid universe people research is very nearly the derivatives-eligible list, so its daily closing series is generated by one mechanism up to 31 July 2026 and another afterwards, and the split falls inside the out-of-sample window of any walk-forward run to the present. How the expiry-day settlement price should be derived from that close was then reopened: a September 2026 consultation put two options out for comment, with comments open until 3 October 2026. The mechanism is new and not yet settled.

It is fair to ask whether the change shows in the data rather than only in the circular. Weakly, it does. Take each stock's close against its own full-day volume-weighted average price, and measure how widely that gap spreads across a group of stocks each day. In the 34 trading days from 2026-08-03 to 2026-09-18 it averaged 66.6 basis points for the high-turnover group, against 60.9 in the matched 34 days from 2026-06-15 to 2026-07-31, a rise of 9.2 per cent. The mid-turnover control, which did not move to the auction, went from 82.7 to 84.0 basis points, a change of 1.6 per cent. The difference is 4.3 basis points, in the direction the mechanism predicts.

That result belongs with its weakness attached, and the weakness is this article's subject. Relabelling the same 68 days at random 20,000 times, a shift at least as large as the observed one appears with probability 0.12. That is not a settled finding, and group membership here is a turnover proxy rather than the published eligibility list. The measure moved as the rule change implies, by an amount this much data cannot separate from chance.

Changes to Indian index derivatives and the closing print, with trading days elapsed to 2026-09-18 counted from the exchange file set
EffectiveWhat changedTrading days since
2024-11-20Contract value reset to the 15 to 20 lakh band; one weekly expiry per exchange452
2025-02-01Option premium required upfront from buyers401
2025-04-01Index position limits monitored intraday, not at end of day363
2025-09-01Expiry weekday moved: Tuesday on one exchange, Thursday on the other260
2026-08-03Closing auction replaced the last-thirty-minute average, derivatives eligible stocks only34
A walk-forward window laid over the dates the Indian market changed A timeline with five marked dates on which the rules governing Indian index derivatives or the closing price changed. Beneath it a training block and a testing block of the length used in this article are drawn to scale, and the training block spans several of the marked dates while the testing block sits inside the most recent segment. The ground under a fixed window 2024-11-202025-02-012025-04-012025-09-012026-08-03 2024 2025 2026 now 250 day training window 60 day test The training block above crosses three separate changes to the rules it is being fitted under. The most recent change is 34 trading days old. One fold of this design needs 310.
Dates from the published regulatory timetable. Trading-day counts computed from the exchange file set used throughout.

The arithmetic is unforgiving. One fold of the configuration above consumes 310 trading days. The expiry weekday has been on its current footing for 260 trading days and the closing auction for 34. There is no way to fit one fold entirely inside the current structure, let alone the several folds a walk-forward needs, so every walk-forward on this market trains on one regime and tests partly in another. The method cannot fix that. The problem is not in the method, it is in the data.

None of which argues against studying a market that changes. It argues for saying which regime a result belongs to, and treating a window that straddles a break as two things averaged together. A result reported without its regime is not wrong so much as unfalsifiable.

What walk-forward is actually for

Walk-forward does one thing reliably: it makes a particular self-deception expensive. A parameter set that memorised a period will not survive being re-fitted and re-scored a dozen times over, and finding that out costs an afternoon rather than a year of live capital. As an elimination tool it is efficient. What it cannot do is certify. The scored record is short, the effects are small, the window lengths are chosen rather than given, the researcher sees every result, and here the ground keeps moving.

So the figure is worth computing and not worth reporting alone. Report the two numbers it came from in absolute terms, so a reader can see whether a high ratio came from a strong forward result or a weak training one. Report how many parameter combinations were searched, and how many window configurations were tried before the one shown. Report the cost assumption. Report the null, because a ratio with nothing to compare it against is decoration. Publish all five and the claim can be checked. Publish the ratio alone and it cannot, and the two look identical.

The judgement that remains is about mechanism: why an effect should exist, what conditions it depends on, whether those still hold after the rules changed, and what would have to be true for it to stop. That is not a fallback for when the statistics run out. Given the sample sizes and regime lengths this market offers it is the larger part of the work, and treating it as a discipline with its own standards is what separates a research process from a search for a number that looks good.

Frequently asked questions

What is walk-forward efficiency in one sentence?

The performance on data a system was not fitted to, divided by the performance on the data it was fitted to, both annualised so windows of different lengths compare. A value near or above one is read as evidence the fit carried forward.

Why does a high walk-forward efficiency not mean a good system?

Because the divisor is the in-sample result. Holding the forward result at eight per cent annualised, an in-sample result of forty per cent scores 0.20 and one of five per cent scores 1.60, with identical forward performance. A researcher who searches a narrow grid is rewarded for having optimised badly.

Can walk-forward efficiency be negative?

Yes, and worse, it can be positive for the wrong reason. Where both figures are negative, a negative divided by a negative is positive. In the null runs computed here, 1 per cent of folds were negative in both windows and every one reports a positive efficiency while having lost money twice.

How is walk-forward different from a single holdout test?

A holdout fits once and scores once, so it answers whether one fit survived one stretch of market. Walk-forward repeats the cycle, so it also asks whether the procedure keeps working as conditions change. It tests the method, not one parameter set.

If walk-forward is harder to pass, why is it still not proof?

Because the researcher sees the result. Once you have looked at the out-of-sample record and then changed the strategy family, the cost model, the universe or the window lengths, that record has entered the fitting even though no optimiser touched it.

How should the training and testing lengths be chosen?

Before looking at any result, for a reason that does not come from the data: the horizon the system trades, or how long its conditions persist. Choosing by which combination gave the best number is the error the procedure exists to prevent, one level up. Here 96 configurations of one unchanged strategy gave efficiencies from -0.21 to 0.79.

When is an anchored window the wrong choice?

When the relationship being fitted has genuinely changed. An anchored window never forgets, so a structural break stays in the training set permanently and keeps pulling the fit toward conditions that no longer exist.

When is a rolling window the wrong choice?

When the effect is small, because a short window will not hold enough observations to find it and the optimiser fits noise instead. It also discards the unusual periods that show how a system behaves under stress.

Does the Indian market give you enough continuous history to do this properly?

For anything touching index derivatives or the closing print, less than people assume. Five rule changes landed between November 2024 and August 2026, and the most recent is 34 trading days old, while one fold of the configuration here consumes 310. A window long enough to fit is one that crosses a rule change.

What should be reported alongside the ratio?

The two figures it came from in absolute terms, the number of parameter combinations searched, the window lengths and why, the cost assumption, and a null from the same procedure on data with no structure. Without the last there is nothing to read the ratio against.

How these numbers were produced. Data: the exchange's full security bhavcopy for the cash segment, 2022-01-03 to 2026-09-18, 1,217 files holding 1,164 sessions. The session date is taken from each file's own trade date column, never its name, and one file is kept per session: asked for a holiday, the archive returns the previous session's file, so 53 files that repeat a session already held are set aside, while the two files named for Monday holidays that hold the Saturday special sessions of 20 January and 18 May 2024 are kept under their own dates. The file set has no copy of 8 August 2022 or of the other weekend special sessions in the period, so those days' moves are absent from the series. Basket: equal weighted across the 200 highest median-turnover symbols quoted on all 1,164 days; returns as close against adjusted previous close; moves beyond 45 per cent dropped as unadjusted prints. Strategy: fast-over-slow moving average of the basket level, long or flat, 72 parameter pairs, 10 basis points one way per change of position, signal at one close setting the next day's position. Annualised figures multiply the mean daily result by 246. Base walk-forward: 250 training days, 60 testing, step 60; the window study repeats it across 96 triples. Null control, a simulation: the same daily returns with their order shuffled, 500 trials, seed 20260919. Closing-print measurement: cross-sectional dispersion of close against full-day average price for a high-turnover group and a mid-turnover control, membership fixed on turnover before 3 August 2026, probability from 20,000 relabellings of the same 68 days. Simulation results describe the behaviour of the statistic, not any actual system. Figures illustrating the arithmetic of the ratio are illustrative and marked as such where they appear.

The position is stated as at September 2026. Indian market structure is under active revision and at least one element described here was open for consultation at the time of writing. Confirm current rules and effective dates with the exchange and the regulator before relying on any window choice, and take advice on your own circumstances.

Related guides

How many trades before you can tell an edge from luck

Read →

The backtesting mistakes that make retail strategies look profitable

Read →

Vectorised backtesting of Indian equities, done correctly

Read →

Ready to go deeper than this article?

Bharath Shiksha is a 90-volume curriculum across 6 stages, from chart reading at ₹14,999 through capital raising, or the full bundle at ₹1,49,999. Knowing why a walk-forward efficiency of 1.0 can mean nothing at all is the kind of judgement the curriculum builds deliberately, as method rather than as a number to quote.

Take the free diagnostic →