Regimes and structural breaks — models describe, regimes decide
▸ Pretest — guess, even if you don't know
You fit a strategy on 2010-2021 data (zero interest rates throughout) and it backtests at Sharpe 1.2. What is the biggest risk of going live in 2022 as rates start rising fast?
Parameters are passengers, regimes drive
This whole track fits models of the form "estimate a parameter, assume it holds." The dirty secret: in markets, parameters aren't constants — they're properties of a regime. Equity vol persistence, the bond-equity correlation, a stock's beta, a pair's hedge ratio — each was different pre- and post-2008, under ZIRP versus a hiking cycle, before and after decimalization gutted market-making spreads in 2001. A parameter fit on pooled history spanning several regimes is a weighted average of numbers from different worlds — and possibly a good description of none of them.
Stationarity (D1-03) was always the load-bearing assumption. Structural breaks are how it fails in practice: not a slow drift but a lurch, after which the old estimates aren't stale — they're about a market that no longer exists.
Detection on a budget: rolling estimates
The full econometric toolkit for break detection (Chow tests, CUSUM) is worth knowing exists, but the workhorse you'll actually use is embarrassingly simple: estimate every parameter you rely on in a rolling window and watch it move. Rolling mean return, rolling vol, rolling beta against the market, rolling hedge ratio for every live pair. Then look — or better, alert — when the rolling estimate leaves the range it has historically occupied:
rolling_beta = [ols_beta(r_s[i:i+250], r_m[i:i+250]) for i in range(len(r_s) - 249)]
A parameter that is genuinely constant produces a rolling estimate that wobbles inside a band (sampling noise, A2-04 sized by the window). A structural break produces a level shift that no honest error bar explains. The exercise below builds the minimal version: rolling means plus a threshold detector. Crude — a threshold on a rolling statistic is a smoke alarm, not a fire marshal, and it triggers late by construction (a window must fill with new-regime data first). But a smoke alarm you actually run beats a Chow test you never do.
The Lucas critique, trading edition
Economist Robert Lucas's 1976 objection to policy models: the estimated relationships are people's behavior under old rules, so changing the rules changes the relationships. The trading translation is sharper: once a pattern is widely known and traded, the regime changes because of the traders. The anomaly's own discovery is the structural break. McLean and Pontiff measured it: published anomaly returns drop by roughly a third to a half post-publication — the factor-decay story you met in A2-05's multiple-testing warnings and B1-06's factor discussion, now with a mechanism. Physics doesn't rearrange itself when you publish about electrons. Markets do — capital flows into the pattern until it's priced away. This is why edges decay by default, and why "it worked for 30 years of backtest" is evidence about a world that included almost nobody trading it.
Practical defenses
You cannot forecast breaks. You can build so that breaks hurt less:
- Walk-forward refitting (D4-01's answer, deep dive in D4-04): refit parameters on a rolling training window so the model tracks the current regime with a lag, instead of worshipping pooled history. The lag is the irreducible cost.
- Regime filters: only run a strategy when the ambient regime matches the one it was built for — e.g., a mean-reversion book that switches off when EWMA vol (D1-08) is above a threshold. Coarse conditioning beats pretending one parameter set serves all weather.
- Size as if the model is partly wrong — because it is. Cap leverage (the D1-08 cap), diversify across strategies whose regimes differ, keep drawdown limits that assume your edge can vanish without notice. Position sizing is the defense that still works when detection fails.
The honest close of Track D1
Ten lessons of machinery: ACF, white noise, unit roots, AR half-lives, ARMA, model selection, GARCH, EWMA, cointegration. All of it real, all of it useful — and all of it descriptive. These models compress how a market has been behaving; they do not legislate how it must behave. Volatility clusters until the structure of the market changes; pairs revert until a merger; carry earns until it crashes. Time-series models describe. Regimes decide. Trade the models, respect the regimes, and size every position as if the regime just changed and you're the last to know.
Try it
Build the smoke alarm: rolling means, and a detector that flags when they've moved more than a threshold across the sample:
Implement rolling_mean(x, w): the array of means of each length-w window, output length len(x) - w + 1. And regime_shift_detected(x, w, threshold): True when max(rolling_mean) - min(rolling_mean) exceeds threshold.
⧉ Review cardWhat does it mean that parameters are regime-dependent?
⧉ Review cardWhat is the budget method for detecting structural breaks, and its limits?
⧉ Review cardState the Lucas critique in its trading form, with the evidence.
⧉ Review cardName three practical defenses against regime change.
⧉ Review cardWhat is the honest summary of Track D1?
Teach it
Teach the Lucas critique, trading edition, to an imaginary friend who just found a beautiful 30-year backtest. In your own words (out loud or on paper): why the historical pattern partly existed because nobody was trading it, what McLean-Pontiff measured, and which of the three defenses you'd insist your friend adopt first — and why.
Predict before the next lesson
Track D1 is complete. Next you go deeper into Track D4's backtesting deep dives (D4-02 onward) — transaction-cost modeling, walk-forward analysis done properly, and the deflated Sharpe ratio. Predict: D4-01 listed the Big Six failure modes. Which of the six is really a regime problem in disguise, and how would walk-forward refitting from this lesson address it?
◈ Calibration check
Could you teach someone why fitted parameters expire with regimes, how a rolling-estimate smoke alarm works and why it lags, and the three defenses — without notes?
1 = guessing · 5 = could teach it
⏻ End of lesson
Mark it read to book its 5 review cards into your deck.
Sources & further reading
- bookLópez de Prado (2018), Advances in Financial Machine Learning — §17
- paperLucas (1976), Econometric Policy Evaluation: A Critique, Carnegie-Rochester Conference Series 1
- paperMcLean & Pontiff (2016), Does Academic Research Destroy Stock Return Predictability?, Journal of Finance 71(1) link