Why stationarity matters for backtests
3 min read
Backtests can mislead when they assume stationarity and the market later shifts regime. Sonar’s sources support the broader validation point: robustness must be tested across changing conditions, and raw Sharpe should be discounted for selection bias using the Deflated Sharpe Ratio.
Backtests are usually run as if the data-generating process is stable enough for rules learned in one sample to remain valid later. The practical problem is that market data often violate that assumption. When the underlying distribution, dependence structure, or volatility regime changes, a model calibrated on one segment of history can face different dynamics out of sample. That is a direct path from an apparently clean backtest to weaker live behavior.
Sonar’s strategy-validation research frames this as a core model-risk issue: a backtest is only one input in validation, and robustness depends on whether results persist across different market conditions rather than only within the historical sample used for design and tuning. The same research emphasizes that overfitting risk rises when a strategy is repeatedly adapted to features that may be specific to the sample rather than persistent in the process being traded. In a non-stationary setting, this distinction becomes more important because the sample may contain regime-specific relationships that do not survive forward deployment.
A useful implication for quantitative traders is that “good historical fit” and “stable expected behavior” are different claims. If a strategy’s edge depends on a relationship observed during one statistical regime, then a later regime shift can invalidate the assumptions behind the signal, execution model, or risk controls. That is why regime awareness belongs in validation rather than being treated as a post-mortem explanation for live divergence.
Discount optimistic backtest statistics when strategy selection and tuning have been extensive. Sonar’s Deflated Sharpe Ratio glossary explains DSR as a correction to the observed Sharpe ratio that adjusts for multiple testing and non-normal return features, with the goal of estimating whether a reported Sharpe is still statistically meaningful after accounting for selection bias. This matters for stationarity because a regime-specific fit can produce an attractive in-sample Sharpe even when the apparent signal is partly an artifact of search over unstable patterns. In that case, raw Sharpe can overstate robustness, while DSR is designed to ask a harder question: after accounting for data-mining effects, how much evidence is left?
Sonar’s Backtest Overfitting Audit tool is aligned with that same validation logic. Its purpose is to assess the risk that a backtest’s apparent quality reflects overfitting rather than a durable relationship. A safe conclusion is not a numeric one about any particular strategy or period, but a methodological one: when non-stationarity is present, the probability that historical tuning captured transient structure is higher, so an overfitting audit becomes more important, not less.
For practitioners, the operational lesson is straightforward. If live results diverge from the backtest, one default explanation is not implementation error alone but regime change interacting with a model that implicitly assumed stationarity. Validation should therefore include checks that ask whether the strategy’s behavior is consistent across materially different environments and whether headline backtest metrics survive deflation for selection bias. Where those checks are absent, confidence drawn from a single historical sample is fragile.
Drafted with AI assistance from cited sources. Reviewed and approved by Sonar Sciences Quant & Research Team.