Research · Dataset

The optimiser's pick is a description of the past, not a forecast

Every backtest that reports "this configuration returned X%" has already decided which configuration to report. This page takes the decision apart. It runs 25 grid configurations over a rolling window, picks the one that looked best in sample exactly as an optimiser would, then runs that same configuration on the next 60 months it never saw. Across 24 walk-forward folds, the in-sample winner returned 0.973% a year in sample and 0.117% a year out of sample on the monthly path of the free-gold era. The in-sample pick landed in the out-of-sample top quartile in 3 of 7 folds.

663 monthly bars since August 1971, of which 562 fall after 1980 · 1968-04-01 to 2026-11-10 on the daily path · 25 candidate configurations × 240-month in-sample × 60-month out-of-sample × 2 price paths

The number that matters

In-sample pick, in sample 0.973% per year, free-gold era, monthly path
Same pick, out of sample 0.117% on the next 60 unseen months
Decay +0.856 pp per year, from the selection
Top-quartile out of sample 3 / 7 folds, monthly path

Read this as a statement about selection, not about grids

The out-of-sample numbers here are small in absolute terms — a grid on gold earns a fraction of buy-and-hold, which is the whole point of running one. The finding is not that grids lose money. It is that choosing a grid configuration on historical data does not buy you a durable edge in the ranking. Across the free-gold era the median fold had a median of 10 of the 25 candidates returning more out of sample than the one selected in sample.

How the test is built

The method is deliberately plain, because the point is to make the selection decision visible rather than to find the best grid.

  • 25 candidate configurations. Spacing of 0.5%, 1%, 2%, 3% and 4% crossed with 5, 10, 20, 30 and 40 levels. The set contains all four configurations used in the published multi-account dataset.
  • 240-month in-sample window, then a 60-month out-of-sample window. The window steps forward 60 months at a time. Out-of-sample blocks never overlap, so the folds are independent of each other.
  • Selection rule. The candidate with the highest in-sample CAGR is chosen, exactly as a strategy optimiser would choose it. No judgement, no human override.
  • Fresh state each segment. Equity 1.0, no open positions, no carried anchor. That is how a live account starts.
  • Cost model. A flat 0.3 US dollars per troy ounce round-turn on every fill. No spread, slippage, financing, margin or tax.
  • Two price paths. Monthly averages from the World Bank Pink Sheet, and daily LBMA benchmark fixes. The same simulator and the same cost model on both, so the sampling-frequency effect measured on the live-versus-backtest page does not contaminate this one.

What "out of sample" does and does not mean here

It means out of the parameter-selection sample on one historical price path. There is no broker statement, no server-side execution, no requote and no swap behind any number on this page. This is a test of the selection procedure, not a live-versus-backtest comparison.

Both eras, both price paths

Every row is recomputed from raw prices by a second, independent implementation of the simulator that shares no code with the one that produced the dataset.

Era and path Folds In-sample pick, IS Same pick, OOS Decay Oracle OOS Selection loss Rank corr. Top quartile
Free gold, Aug 1971 onward · Monthly averages 7 0.973% 0.117% +0.856 pp 1.340% 1.222 pp -0.122 3 / 7
Free gold, Aug 1971 onward · Daily benchmark fixes 7 2.292% 1.837% +0.455 pp 4.242% 2.405 pp 0.090 2 / 7
Post-1980 · Monthly averages 5 0.857% 0.574% +0.284 pp 2.226% 1.652 pp -0.081 2 / 5
Post-1980 · Daily benchmark fixes 5 2.117% 4.330% -2.213 pp 5.403% 1.072 pp 0.180 3 / 5

Reading the table. "In-sample pick, IS" is the average annualised return of the configuration the optimiser chose, measured on the data it chose it on. "Same pick, OOS" is that same configuration on the following 60 months it never saw. "Decay" is the difference. "Oracle OOS" is the best configuration out of sample had the future been known — the ceiling the selection could not reach. "Selection loss" is the gap between that ceiling and the selection. "Rank corr." is the Spearman correlation between the in-sample ranking of all 25 candidates and their out-of-sample ranking; a value near zero means the in-sample ranking carried no information about the out-of-sample ranking.

The in-sample ranking does not survive the walk-forward

This is the core result. If parameter selection worked, the in-sample ranking of the 25 candidates would carry forward into the out-of-sample window. It does not.

Measure Free gold, monthly Free gold, daily Post-1980, monthly Post-1980, daily
Mean Spearman, IS vs OOS ranking -0.122 0.090 -0.081 0.180
Median fold Spearman -0.193 0.371 0.072 0.864
Folds with positive rank correlation 3 / 74 / 73 / 53 / 5
Mean candidates beating the pick out of sample 11.57 of 25 10.57 of 25 11.20 of 25 6.80 of 25
Folds where the pick was in the OOS top quartile 3 / 7 2 / 7 2 / 5 3 / 5
Out-of-sample spread among candidates (pp) 1.1452.7511.4313.085
In-sample spread among candidates (pp) 0.4841.2360.5501.150

On the monthly paths the correlation is slightly negative: the configuration that looked best in sample was, if anything, slightly more likely than average to be a poor out-of-sample choice. That is the signature of selection noise rather than of a weak edge.

Why the spread matters

The out-of-sample spread among the 25 candidates is wider than the in-sample spread in every era and on every path (1.145 against 0.484 pp on the free-gold monthly path; 3.085 against 1.150 pp on the post-1980 daily path). The selection is picking the winner of a contest whose outcome is mostly luck, and that is exactly why the winning margin does not carry forward.

Fold by fold

The full walk-forward. "Picked" is the configuration the optimiser selected in sample; "oracle" is the configuration that turned out to be best out of sample; "beat" counts how many of the 25 candidates returned more out of sample than the pick.

Free gold, Aug 1971 onward

Gold has no fixed price ceiling from this point on. The era includes the 1974 and 1980 price shocks and the 2011 and 2020 runs.

In sample Out of sample Picked IS CAGR OOS CAGR Decay Oracle Oracle OOS Beat Rank
1971-08 → 1991-07 1991-08 → 1996-07 2% × 30 0.712% 0.696% +0.016 pp 0.5% × 20 2.354% 10 44.0%
1976-08 → 1996-07 1996-08 → 2001-07 4% × 20 -0.099% -1.376% +1.278 pp 4% × 10 -1.376% 0 4.0%
1981-08 → 2001-07 2001-08 → 2006-07 4% × 20 -0.026% 0.830% -0.856 pp 0.5% × 30 3.136% 20 84.0%
1986-08 → 2006-07 2006-08 → 2011-07 0.5% × 40 0.980% 3.123% -2.142 pp 0.5% × 20 3.123% 0 4.0%
1991-08 → 2011-07 2011-08 → 2016-07 0.5% × 40 2.154% -3.112% +5.266 pp 4% × 10 -0.352% 24 100.0%
1996-08 → 2016-07 2016-08 → 2021-07 1% × 40 0.955% 1.593% -0.638 pp 0.5% × 30 2.321% 3 16.0%
2001-08 → 2021-07 2021-08 → 2026-07 0.5% × 40 2.132% -0.933% +3.066 pp 3% × 5 0.172% 24 100.0%

Monthly averages path.

In sample Out of sample Picked IS CAGR OOS CAGR Decay Oracle Oracle OOS Beat Rank
1971-08 → 1991-07 1991-08 → 1996-07 0.5% × 10 1.059% 1.296% -0.237 pp 0.5% × 30 2.029% 7 32.0%
1976-08 → 1996-07 1996-08 → 2001-07 0.5% × 5 0.431% -2.588% +3.019 pp 4% × 10 -1.229% 12 52.0%
1981-08 → 2001-07 2001-08 → 2006-07 4% × 20 0.305% 1.608% -1.304 pp 0.5% × 40 6.839% 20 84.0%
1986-08 → 2006-07 2006-08 → 2011-07 2% × 30 1.323% 6.106% -4.783 pp 0.5% × 40 11.717% 8 36.0%
1991-08 → 2011-07 2011-08 → 2016-07 0.5% × 40 4.506% -3.553% +8.059 pp 4% × 10 0.191% 24 100.0%
1996-08 → 2016-07 2016-08 → 2021-07 0.5% × 40 3.126% 4.905% -1.779 pp 0.5% × 40 4.905% 0 4.0%
2001-08 → 2021-07 2021-08 → 2026-07 0.5% × 40 5.299% 5.087% +0.211 pp 0.5% × 10 5.242% 3 16.0%

Daily benchmark fixes path.

Post-1980

The years after the disinflation wave broke, which is the part of the sample most backtests actually cover.

In sample Out of sample Picked IS CAGR OOS CAGR Decay Oracle Oracle OOS Beat Rank
1980-01 → 1999-12 2000-01 → 2004-12 4% × 5 -0.782% 0.737% -1.519 pp 0.5% × 20 2.572% 20 84.0%
1985-01 → 2004-12 2005-01 → 2009-12 1% × 40 0.643% 2.221% -1.578 pp 0.5% × 30 4.563% 5 24.0%
1990-01 → 2009-12 2010-01 → 2014-12 0.5% × 40 2.333% -4.463% +6.796 pp 2% × 5 -1.419% 24 100.0%
1995-01 → 2014-12 2015-01 → 2019-12 0.5% × 10 0.445% 1.897% -1.451 pp 0.5% × 30 2.938% 7 32.0%
2000-01 → 2019-12 2020-01 → 2024-12 0.5% × 40 1.646% 2.477% -0.830 pp 0.5% × 30 2.477% 0 4.0%

Monthly averages path.

In sample Out of sample Picked IS CAGR OOS CAGR Decay Oracle Oracle OOS Beat Rank
1980-01 → 1999-12 2000-01 → 2004-12 0.5% × 5 -1.284% 2.588% -3.872 pp 0.5% × 40 5.600% 12 52.0%
1985-01 → 2004-12 2005-01 → 2009-12 0.5% × 40 1.479% 8.959% -7.479 pp 0.5% × 40 8.959% 0 4.0%
1990-01 → 2009-12 2010-01 → 2014-12 0.5% × 40 3.446% -2.104% +5.551 pp 0.5% × 5 0.244% 22 92.0%
1995-01 → 2014-12 2015-01 → 2019-12 0.5% × 40 2.512% 4.953% -2.441 pp 0.5% × 40 4.953% 0 4.0%
2000-01 → 2019-12 2020-01 → 2024-12 0.5% × 40 4.431% 7.256% -2.825 pp 0.5% × 40 7.256% 0 4.0%

Daily benchmark fixes path.

Against the alternatives

If optimising buys nothing, then a fixed configuration should do about as well — and in the fold counts below, often better.

Era and path Pick beats fixed 2% grid Pick beats buy-and-hold Pick OOS CAGR Fixed 2% OOS CAGR Buy-and-hold OOS CAGR
Free gold, Aug 1971 onward · Monthly averages 3 / 7 2 / 7 0.117% 0.090% 7.613%
Free gold, Aug 1971 onward · Daily benchmark fixes 5 / 7 3 / 7 1.837% 1.383% 7.642%
Post-1980 · Monthly averages 3 / 5 0 / 5 0.574% 0.785% 9.566%
Post-1980 · Daily benchmark fixes 3 / 5 1 / 5 4.330% 2.553% 9.356%

The fixed reference is the 2%-spacing, 10-level grid — the configuration used throughout the published multi-account dataset. On the monthly path of the free-gold era the optimised pick beat it in 3 folds of 7, and on the post-1980 monthly path in 3 of 5. The pick's average out-of-sample return was 0.117% against the fixed grid's 0.090% — a difference of 0.027 percentage points, which is noise at this fold count.

Every one of these grids returns a small fraction of buy-and-hold, which is the trade a grid makes: it gives up a large share of the upside to cut the drawdown. On the monthly path of the free-gold era the selected configuration's average out-of-sample maximum drawdown was -9.51% against buy-and-hold at -21.33%. That trade is real. The optimiser's contribution to it is not.

Reproducibility

Every number on this page comes from a script, and every number is checked by a second script that shares no code with the first.

Cross-check Recomputed here Published multi-account dataset
Buy-and-hold CAGR, full sample 7.399% 7.399%
Buy-and-hold max drawdown -62.07% -62.07%
2% grid CAGR, full sample 1.116% 1.117%
2% grid max drawdown -36.26% -36.26%
2% grid fill count 129 129

Price sources. Monthly averages are the World Bank Commodity Price Data (Pink Sheet), Monthly Prices sheet, column 70 (Gold), updated November 03, 2026. Daily bars are the LBMA Gold Price PM benchmark fix from 1968-04-01 to 2026-11-10, with World Gold Council FSAPI prices after 2026-02-25.

Scripts. The analysis is scripts/gold_ea_param_decay_analysis.py. The independent check is scripts/verify_gold_ea_param_decay.py, which re-implements the simulator with a different internal structure, re-derives the fold boundaries from the raw price files, and recomputes every per-fold CAGR, every aggregate and every published CSV row from scratch. The narrative version of the same test is What optimisation actually leaves you. The published data are CSV row from scratch. The published data are the fold table and the full candidate table.

Frequently asked questions

How much of an optimised backtest survives out of sample?

Less than the backtest claims. Across the free-gold era since August 1971, the configuration an optimiser would have picked on 240 months of in-sample data returned 0.973% a year in sample but 0.117% a year on the next 60 months that were never used for the choice — a decay of 0.856 percentage points a year. On the daily price path the same test gives 2.292% in sample and 1.837% out of sample. The chosen configuration was not a forecast of which grid would work next; it was a description of which grid had worked before.

Is the in-sample winner even a good out-of-sample configuration?

Usually not, and this is the sharpest finding. On the monthly path of the free-gold era, the in-sample pick landed in the top quartile out of sample in only 3 of 7 folds, and a median of 10 of the 25 candidate configurations returned more out of sample. On the post-1980 monthly path the in-sample pick beat the fixed 2% reference in 3 folds of 5. Optimising over 25 candidates does not buy you a ranking; it mostly buys you noise.

How much does the selection cost compared with an oracle?

An oracle is the configuration that would have been best out of sample had you known the future in advance. The gap between that oracle and the in-sample pick is the price of optimising. It averages 1.222 percentage points a year on the monthly path of the free-gold era, 2.405 points on the daily path, 1.652 points on the post-1980 monthly path and 1.072 points on the post-1980 daily path. In every era and on every path the selection loses to the oracle.

Does the in-sample ranking even carry information about the out-of-sample ranking?

Barely. The Spearman rank correlation between the in-sample ranking of the 25 candidates and their out-of-sample ranking averages -0.122 on the monthly path of the free-gold era and -0.081 on the post-1980 monthly path — both slightly negative, meaning the in-sample winner is if anything slightly worse than random. On the daily paths the correlation is 0.09 and 0.18. The one exception is the post-1980 daily path, where the median fold correlation is 0.864, and that is a five-fold result on one price path, not a law.

How much of the in-sample return was just the drawdown you happened to sample?

The spread of out-of-sample results among the 25 candidates is wider than the spread in sample: 1.145 percentage points out of sample against 0.484 points in sample on the monthly path of the free-gold era, and 3.085 against 1.15 points on the post-1980 daily path. Selection is picking the winner of a noisy contest. The winner's margin is mostly luck, which is exactly why it does not carry forward.

Does the selected configuration beat simply holding gold, or using a fixed grid?

Not reliably. On the monthly path of the free-gold era the selected configuration beat buy-and-hold in 2 folds of 7, and it beat the fixed 2%-spacing, 10-level reference in 3 of 7. Its average out-of-sample return was 0.117% a year against buy-and-hold at 7.613% and the fixed reference at 0.09%. On the post-1980 daily path it beat buy-and-hold in 1 fold of 5.

Is the negative out-of-sample result caused by costs or by the grid rule itself?

Neither, mostly. Trading costs are charged at a flat 0.3 US dollars per troy ounce round-turn on every fill, and the same simulator reproduces the published multi-account dataset to 7.399% against a published 7.399% for buy-and-hold and 1.116% against a published 1.117% for the 2% grid, with 129 fills against a published 129. The decay is what is left after those costs are deducted from both the in-sample and the out-of-sample leg, so it measures parameter selection, not fee levels.

What are the limits of this analysis?

Four, and they matter. First, this is one historical price path per era, not a distribution of paths, and each era yields only 7 and 5 folds, so the fold-level numbers carry real sampling uncertainty. Second, "out of sample" means out of the parameter-selection sample on that path; there is no broker statement, no server-side execution, no requote, no swap and no intraday path inside a daily bar, so it cannot be quoted as a live result. Third, every in-sample and out-of-sample segment starts from a fresh state with no carried positions, which is closer to how a live account starts than a continuous backtest would be, but it also means each segment is a separate experiment. Fourth, no spread, slippage, financing, margin or tax is modelled beyond the flat 0.3 dollar per ounce round-turn grid cost.

Educational content only. Not investment advice. Trading forex and CFDs carries substantial risk of loss.