3.5 Why OOS Failure Is Often a Stationarity Failure
Most OOS failures get blamed on overfitting. Often it is regime change between IS and OOS. Run the diagnostic flow: permutation, pipeline audit, sample size, regime overlap test, in order.
Aligrithm is an independent research publication on systematic trading, quantitative research, market microstructure, and adaptive systems. Long-form essays, code notebooks, and architecture breakdowns across eight pillars, built for traders who care more about how markets behave than about hype.
More about the publication →Read in order. Each pillar walks you out of one trap with one new ability. The newest article is the worst place to begin.
Most OOS failures get blamed on overfitting. Often it is regime change between IS and OOS. Run the diagnostic flow: permutation, pipeline audit, sample size, regime overlap test, in order.
A trading system never dies without warning. Eight diagnostic metrics flash months before the equity curve. Read the metrics. Hard kill switches written at deployment, automatic at threshold.
Every strategy has a finite life. Four decay mechanisms: crowding, regime drift, microstructure, capacity. Size against half-life. Run a shadow book. Write the decommission policy at deployment.
Slow drift is harder to detect than abrupt breaks because standard tests have weak power against it. CUSUM and long-vs-short divergence catch what ADF misses. Trust the alarm when it triggers.
Every trading rule assumes stationarity. Markets violate it constantly. Strategies do not break because the rule fails; they break because the regime moves. Rolling stats first, then ADF and KPSS.
Market cycles exist but are evanescent: period drifts, amplitude decays, phase loses coherence. SPX cycle ranged 8 to 28 bars across six regimes in seven years. Gate cycle-mode strategies by regime.
The dominant cycle is measurable. Autocorrelation periodogram gives a number with known precision. Elliott Wave, Gann, Bradley dates produce no falsifiable measurement. Numbers feed adaptive logic.
Indicators inherit the input's amplitude. BPF on SPX swings ±0.4% in 2017 and ±3.1% in March 2020. AGC rescales continuously so thresholds become regime-independent. The fix is one pipeline stage.
Linear filters integrate every bar including outliers. Median filters select the typical value. For volume, true range, and tick data, median (or Hampel) is the default; linear smoothers come after.
Every linear indicator has known lag. Sum cascades, compare to time-to-half-move. EMA+RSI on 5-bar mean reversion: 17-bar lag, structurally broken. Audit lag before backtesting, not after deployment.
Every linear indicator is a filter with a unique frequency response. RSI(14), MACD(12,26), Stochastic(14) read the same 15-40 bar cycle band three different ways. The confluence is redundancy.
At a turning point, the MA reports the prior regime as the present. EMA(50) signaled the SPX March 2020 bottom 27 bars late; cycle-mode detectors fired in 2-5 bars. Structural lag, not a tuning bug.