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. A regime — a stretch of time during which the market's rules of thumb hold steady. Equity vol persistence, the bond-equity correlation, a stock's beta (its sensitivity to the overall market), a pair's hedge ratio — each was different across regime boundaries. Different pre- and post-2008. Different under ZIRP (zero interest-rate policy) versus a rate-hiking cycle. Different before and after decimalization — the 2001 switch to one-cent price increments — gutted market-making spreads. A parameter fit on pooled history spanning several regimes is a weighted average of numbers from different worlds. It is possibly a good description of none of them.
Stationarity (D1-03) was always the load-bearing assumption. Structural breaks — sudden, permanent changes in the data's underlying rules — are how it fails in practice. Not a slow drift but a lurch. Afterward the old estimates aren't stale — they're about a market that no longer exists.
Detection on a budget: rolling estimates
A full econometric toolkit for break detection exists — Chow tests and CUSUM, formal statistical detectors of parameter change — and it's worth knowing the names. 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 — ordinary sampling noise, sized by the window as in A2-04. A structural break produces a level shift: the estimate steps to a new range that no honest error bar explains. The exercise below builds the minimal version, rolling means plus a threshold detector. It is crude. A threshold on a rolling statistic is a smoke alarm, not a fire marshal, and it triggers late by construction — the window must first fill with new-regime data. 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 the old rules. Change the rules, and you change the relationships. The trading translation is sharper: once a pattern is widely known and traded, the regime changes because of the traders. The discovery of an anomaly — a return pattern that standard theory says shouldn't exist — is itself the structural break. McLean and Pontiff measured it: published anomaly returns drop by roughly a third to a half after publication. That is the factor-decay story you met in A2-05's multiple-testing warnings and B1-06's factor discussion, now with a mechanism attached. 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. It's also why "it worked for 30 years of backtest" is evidence about a world in which almost nobody was 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. Example: a mean-reversion book that switches itself off whenever 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 — hard rules that cut risk after your account falls a set amount from its peak — 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 — strategies that collect a steady yield for bearing risk — 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