Research question
Using 240 months of returns for three hypothetical assets, two 12-month momentum signals are compared: one uses returns through month t (including the current month, look-ahead) and one through t-1 (implementable). How much does look-ahead inflate the annualized return? And after selecting the best of 1000 random strategies, what remains out of sample? Returns use seed 20261033 and strategies seed 20261034; both are simulated.
Data
| Item | Value |
|---|---|
| Sample | 240 months; 228 portfolio months |
| Frequency and unit | monthly returns; annualized percent; Sharpe is unitless |
| Assets | 3 hypothetical assets, monthly rebalancing |
| Look-ahead momentum | 20.8% annualized (simple basis 23.1%), Sharpe 1.32 |
| Lagged momentum | 11.4% annualized (simple basis 12.0%), Sharpe 0.72 |
| Equal-weight portfolio | 9.2% annualized (simple basis 9.6%), Sharpe 0.72 |
| Random strategies | 1000; 120 in-sample months, 108 out-of-sample months |
| Best in-sample Sharpe | 0.87; its out-of-sample value -0.10 |
| Mean out-of-sample Sharpe of the top 10 | -0.26 |
| Correlation of in-sample and out-of-sample Sharpe | -0.23 (mean out-of-sample across all 1000 strategies 0.01) |
| License | simulated data, no external license |
Method and assumptions
The backtest forms a position at the start of each month from the signal and holds it to month-end; only information available at formation may be used. Look-ahead bias means using future or same-period information that was not yet published, for example the current month’s return in the current month’s position. The random strategy family runs on pure-noise assets (μ = 0), so no real skill exists and its best in-sample value measures luck; an extreme-value approximation for 1000 draws gives 0.84, the same order as the 0.87 actually obtained. The multiple-testing problem here is reporting only the best selected strategy and not the number of trials (see Multiple Testing and Data Snooping); Bailey et al. (2014) show that the probability of backtest overfitting rises with the number of configurations tried, while the number tried is rarely reported [1]. The two experiments run on different asset universes with their own seeds, and the model is produced by one run of the in-repo script scripts/simulate-backtesting.mjs (mulberry32 pseudo-random numbers with a Marsaglia polar normal; the same seed reproduces the output byte for byte). Look-ahead universe: 3 hypothetical assets over 240 months with monthly means μ = 1.0%, 0.4%, -0.2%, monthly standard deviations σ = 5.0%, and pairwise correlation ρ = 30.0% (seed 20261033). Multiple-testing universe: 10 pure-noise assets with μ = 0, σ = 5.0% and ρ = 0 (seed 20261036); the 1000 strategies are random long/short portfolios holding each asset at ±1/10 (weight seed 20261034). Returns are annualised as the mean monthly log return times 12 (log basis), with the simple-return equivalent in brackets; Sharpe is mean over standard deviation times √12. Implied monthly volatility works out to 4.5% for the look-ahead series, 4.6% for the lagged series and 3.7% for equal weight. Neither measure deducts a risk-free rate or trading costs.
Results
Look-ahead momentum earns 20.8% annualized with Sharpe 1.32; the implementable version earns 11.4% with Sharpe 0.72; equal weight earns 9.2% with Sharpe 0.72. Look-ahead is 9.4 percentage points higher, and the gap mainly comes from the signal containing the return being predicted. Among 1000 random long/short strategies built on pure-noise assets, the best in-sample Sharpe is 0.87 with an out-of-sample value of -0.10; the top 10 average -0.26 out of sample, all 1000 strategies average 0.01 out of sample, and the in-sample/out-of-sample correlation is -0.23. The selected maximum carries no forward information.
Robustness
- With 6- or 9-month momentum and quarterly rebalancing, the look-ahead signal still contains the month being predicted; the values change but the direction does not.
- Comparisons should deduct trading costs, turnover and borrowing fees; costs press down both versions, while the gap between the look-ahead and the implementable version comes from the timing of the information, not from the cost assumptions.
- A different out-of-sample split changes the best strategy’s out-of-sample result, but not the instability of the in-sample ranking.
Limitations
The simulated assets and random strategies are teaching devices, not a real market; costs, borrowing fees, liquidity and capacity are omitted. The multiple-testing example covers one strategy family, while real research also faces data snooping, survivorship bias and parameter search (survivorship bias and cost handling are the subject of Survivorship Bias and Trading Costs). A high in-sample Sharpe is only a fit statistic, and a fit statistic alone cannot show that a model is adequate (NIST/SEMATECH, 4.4.4). Out-of-sample testing is not final either: a strategy can fail after publication. A high look-ahead return is not performance evidence.
Reproduction
- Run
scripts/simulate-backtesting.mjs: it generates 240 months of returns for the three trending assets with seed 20261033 (μ 1.0%, 0.4%, -0.2%, σ 5.0%, ρ 30.0%). - Select an asset with 12-month returns including the current month, then with returns lagged one month.
- Compute annualized returns and Sharpe over 228 months.
- On 10 pure-noise assets from seed 20261036, generate 1000 random long/short strategies with weight seed 20261034, select the best on the first 120 months and evaluate the last 108.
- Report the number of trials, all results and the cost assumptions; if the parameters change, rerun
node scripts/simulate-backtesting.mjs --selftestandnode scripts/simulate-backtesting.mjs --checkrather than editing numbers by hand.
universe_A (look-ahead): assets = 3; mu_month = 1.0%, 0.4%, -0.2%; sigma_month = 5.0%; rho = 30.0%; seed = 20261033
universe_B (multiple testing): assets = 10; mu = 0; sigma = 5.0%; rho = 0; seed = 20261036
months = 240; portfolio months = 228
signal_ahead = sum(log(1+r[a,t-11..t]))
signal_lagged = sum(log(1+r[a,t-12..t-1]))
Sharpe = mean/sd*sqrt(12)
1000 random long/short strategies; IS 120, OOS 108
Strength of conclusions
The look-ahead return is an artifact of construction, not strategy skill, and the best in-sample result among random strategies does not extrapolate; OpenStax notes that a prediction outside the observed range is unreliable even when the equation produces a value. The evidence supports the rule that a backtest must use information available at the time and report the number of trials; it does not support any forecast of a real strategy’s return.
Knowledge-point review
look-ahead bias
Definition: Look-ahead bias uses information unavailable at the time, such as future earnings, revised data or post-close prices.
Mechanism: It comes from timestamp mismatch, announcement lags and adjustment, making strategies look better than live.
Example: For example, using the close to decide an open trade, or final revised GDP to backtest a real-time strategy.
Boundary: Look-ahead is not only obvious errors; release timing, time zones, vendor coverage and missing point-in-time data cause it, and fixing requires rebuilding data as-of availability.
survivorship bias
Definition: Survivorship bias uses only firms, funds or assets that survived to today, ignoring delisted, bankrupt or closed ones.
Mechanism: It overstates historical returns and understates risk, especially in fund databases and index membership.
Example: For example, backtesting only current listed firms excludes bankruptcies and delistings, inflating returns.
Boundary: Survivorship is not minor; delistings, mergers and closures change samples, index history and fund databases include backfill, and point-in-time universes are needed.
data snooping
Definition: Data snooping repeatedly examines the same data and tries many models or parameters until a significant result appears.
Mechanism: It exploits chance patterns and creates false discoveries; multiple testing, out-of-sample and preregistration mitigate it.
Example: For example, testing hundreds of factors yields some apparently significant, which fail out of sample.
Boundary: Snooping is not deliberate cheating; researchers may select unconsciously, publication bias and HARKing amplify it, and correction reduces power but is necessary.
overfitting
Definition: Overfitting fits training-sample noise too closely and generalises poorly out of sample.
Mechanism: It comes from too many parameters or features, small samples and repeated tuning; regularisation, simplification, cross-validation and more data help.
Example: For example, a complex model is 99 percent accurate in training but 55 percent in test.
Boundary: Overfitting is not just complexity; simple models can underfit, regularisation and validation are biased, and economic meaning and stability matter more than training accuracy.
out-of-sample testing
Definition: Out-of-sample testing evaluates a model on data not used for training or tuning, testing generalisation.
Mechanism: Strict out-of-sample needs time splits, locked models and one-shot tests; rolling out-of-sample mimics real-time updates.
Example: For example, train on 2010-2018 and test untouched data from 2019-2022.
Boundary: Out-of-sample is not absolute proof; repeated tests become in-sample, drift invalidates history, and passing may still fail on costs, capacity and execution.
trading costs
Definition: Trading costs are fees and frictions from trading, including commissions, spreads, impact, slippage, financing and taxes.
Mechanism: Costs rise with size, illiquidity, volatility and frequency; backtests must deduct realistic costs for credible net returns and capacity.
Example: For example, a high-turnover strategy with 10 percent gross return may net only 3 after spreads and impact.
Boundary: Costs are not fixed assumptions; market state, order size and execution change them, backtests often understate, and capacity estimates become optimistic.
robustness and sensitivity
Definition: Robustness means results withstand reasonable changes, and sensitivity is how results respond to parameters, samples, periods and costs.
Mechanism: Checks include different samples, subperiods, parameters, benchmarks and costs; sensitivity shows key assumptions.
Example: For example, a strategy is robust only if it works across most subperiods and cost assumptions.
Boundary: Robustness is not repeating one result; too many tests snoop, robustness can reflect shared bias, sensitivity ranges can be chosen to flatter, and rules should be pre-set.
Related
- Required prerequisite: Rolling Analysis and Structural Change (RES-018).
- Related reading: Leads, Lags and Forecasting (RES-017), Rolling Analysis and Structural Change (RES-018), A Reproducible Research Workflow (RES-008).
Figures in plain language
The three figures below check the mechanism, boundary and comparison in this article; labels come from its own sections, not new data.
Exercises
- When does using the current month’s return in a signal count as look-ahead bias?
- Why is the best in-sample Sharpe close to zero out of sample?
- Why does reporting the number of trials matter?
Suggested answers
- The current month’s return is known only at month-end; using it to form a position at the start of the month uses information not then available.
- Taking the maximum of many random strategies mostly selects luck, and the same luck is absent out of sample.
- The more trials, the more likely the maximum is an accidental high value; without the count, readers cannot judge the degree of overfitting.
Sources
- Bailey, David H., Jonathan M. Borwein, Marcos López de Prado, and Qiji Jim Zhu. “Pseudo-mathematics and financial charlatanism: The effects of backtest overfitting on out-of-sample performance.” Notices of the American Mathematical Society 61, no. 5 (2014): 458–471. Copyright held by the authors; cite-only. https://www.davidhbailey.com/dhbpapers/backtest-pseudo.pdf (accessed 2026-10-30)
- NIST/SEMATECH. e-Handbook of Statistical Methods, “4.4.4 How can I tell if a model fits my data?” U.S. Government work (public domain). https://www.itl.nist.gov/div898/handbook/pmd/section4/pmd44.htm (accessed 2026-10-30)
- OpenStax. Introductory Statistics 2e, “12.5 Prediction.” CC BY-NC-SA 4.0. https://openstax.org/books/introductory-statistics-2e/pages/12-5-prediction (accessed 2026-10-30)
Worked demo
Read-through check: can you say three things?
No recitation needed. Tick each sentence below and see whether you can explain the mechanism, one worked example and one boundary in your own words.
Ticked 0 / 3
The numbers are teaching assumptions that show relationships, not forecasts or investment advice.
This article has passed the current publication gate. Factual, calculation and translation revisions update both language versions together.