Ask ten quants how they handle changing market conditions and nine will mutter something about regime detection before changing the subject. It sounds simple — markets have different states, detect them, adapt your strategy. But getting this right is genuinely hard, because by the time a regime is obvious to everyone, you've already absorbed most of the damage.

The core problem is that regimes are hidden. You never observe "we are in a bear market" directly — you infer it from noisy price data, volatility, and correlations that shift constantly. It's like trying to diagnose an engine problem purely from vibrations felt through the steering wheel. You're always working with indirect evidence.

CONCEPTHMMs model market regimes as latent states inferred from observable returns — giving your strategy a probabilistic read on current conditions.
WARNINGRegime models fitted entirely in-sample will detect regimes beautifully in the past and catastrophically in live trading — always validate out-of-sample.
KEY IDEAThe goal isn't to predict regime changes — it's to size and filter positions appropriately once a shift in probability is detected.

A Hidden Markov Model assumes your observable data — say, daily log returns — is generated by an underlying process that switches between a small number of hidden states. In practice, systematic equity traders typically specify two or three states: low-volatility trending, high-volatility trending, and high-volatility mean-reverting. The model learns transition probabilities between states and the emission distributions for each state via the Baum-Welch algorithm, which is just expectation-maximisation dressed in a trench coat.

Regime Probability Over Time1.00.50.0TimeBull StateBear State

In practical implementation, a two-state Gaussian HMM fitted to weekly equity index returns will typically identify a low-volatility regime with positive mean returns and a high-volatility regime with negative or near-zero mean returns. Traders then use the posterior state probabilities — not hard classifications — to scale position sizes continuously. When bear-state probability exceeds 0.65, reduce gross exposure by a corresponding fraction. This avoids the whipsaw of binary switching. The deeper reading on this probabilistic approach to volatility scaling is worth the time, and the broader academic framing of regime change in economics shows why these transitions are non-trivial to model robustly.

The practical takeaway: fit your HMM on a rolling in-sample window, extract today's state probabilities each morning before the open, and use them as a position-sizing multiplier rather than a trade filter. Start with two states and weekly returns — adding complexity before you understand the simple version is how quants lose money elegantly.

Regimes don't announce themselves — but a well-implemented HMM at least stops you from being the last one to notice.

This content is for educational purposes only and does not constitute financial product advice. Past performance is not indicative of future results. Profit Logic Ltd (ACN 688 669 936) accepts no responsibility for errors or omissions in this content or anywhere on this website. Always seek advice from a licensed financial adviser before making investment decisions.