Regime-Conditional ML Models
A single model trained across all market conditions often ends up mediocre in every one of them, because the relationships it learns can flip sign between regimes — conditioning the model on regime, or fitting separate models per regime, can fix that.
Prerequisites: Regime Classification for Risk Scaling, Deriving Regime Labels for Model Switching
A momentum signal that works well in a trending market can lose money in a choppy, mean-reverting one — and a model trained on a mix of both regimes, without being told which is which, ends up learning a compromise relationship that fits neither regime particularly well. A regime-conditional model fixes this by letting the model behave differently depending on which environment the market is currently in, rather than forcing one set of learned relationships to cover every environment.
When a feature's relationship with returns changes sign or strength across market regimes, a single unconditional model averages those relationships into something weaker than either — feeding the model a regime indicator, or training separate models per regime, lets it use the sign and strength that actually applies right now.
Why one model can underperform two specialized ones
Suppose momentum works (past winners keep winning) in trending regimes but reverses (past winners give back gains) in choppy regimes. A single model trained across a mixed history sees momentum sometimes predict positive future returns and sometimes negative ones, and — lacking any way to distinguish the two contexts — settles on a muted, close-to-zero average relationship that captures neither regime's true pattern well. Only if the model is given the regime as information, or a separate model is trained per regime, can it use the strong version of the relationship instead of the averaged-away one.
A model with access to a regime feature can effectively draw a different decision boundary in each regime, rather than one boundary compromising across both — the added feature doesn't just shift the model, it lets the model specialize.
Worked example
A researcher studies a trend-following signal on a broad futures universe across 15 years of data, split into a "trending" regime (defined by realized trend strength above a threshold) covering 60% of days, and a "choppy" regime covering the rest.
- Unconditional model. Trained across all data without a regime flag, the model's learned coefficient on the trend feature is modest and only weakly significant, because it is averaging a strongly positive relationship in trending periods with a near-zero or negative one in choppy periods.
- Regime-conditional model. Adding a binary regime indicator as a feature (or training two separate models) reveals the trend feature's coefficient is roughly three times larger in the trending regime alone, and close to zero — sometimes negative — in the choppy regime.
- Practical result. Deploying the regime-conditional version and scaling the trend signal up in trending regimes, down in choppy ones, produces a smoother equity curve than either the unconditional model or a model that ignores regime entirely, because it stops applying full-strength trend exposure exactly when trend-following historically hasn't worked.
What this means in practice
Regime conditioning requires a reliable, timely way to classify the current regime — using volatility, trend strength, macro indicators, or a statistical regime-detection model — and that classification is itself a source of error: a regime label that lags the true shift, or flickers between states, can hurt more than a plain unconditional model would have. The added complexity is only worth it when the regime dependency is strong and the regime itself can be identified with reasonable lag.
Fitting separate models per regime with too few observations in a smaller regime (say, a rare high-volatility state) invites severe overfitting — a "regime-specific" model trained on a handful of crisis episodes can fit noise as easily as it fits signal, and should be validated with that small-sample risk explicitly in mind.
Related concepts
Practice in interviews
Further reading
- de Prado, Advances in Financial Machine Learning (ch. on structural breaks)
- Ang & Timmermann, 'Regime Changes and Financial Markets'