Detecting Equity Market Regimes with Gaussian Hidden Markov Models
Summary
The article demonstrates fitting Gaussian hidden Markov models (HMMs) to simulated returns and S&P 500 daily returns. In the simulation, bullish and bearish periods are generated with different means and variances; a two-state model is then fitted with expectation maximisation, and its posterior state probabilities are compared with the known simulated regimes. The model identifies the broad phases, with some lag.
For real market data, the article compares two-state and three-state fits and describes how inferred states correspond to calmer and more volatile periods. It frames regime detection as unsupervised learning: the true number of states is unknown, and market conditions have no ground-truth labels. State choice depends on the asset, timeframe, and observations used. The examples are exploratory rather than evidence of predictive or trading performance. In particular, forcing a chosen number of states can produce switching patterns that are hard to interpret, so using HMM probabilities to alter trade signals requires careful research and asset-specific judgment.
Key ideas
- HMMs infer hidden market states from observed returns by estimating posterior probabilities for each state.
- A simulated series with alternating return distributions provides known states for checking whether a fitted model recovers regime changes.
- The article applies two-state and three-state Gaussian HMMs to S&P 500 returns and interprets states through changes in volatility.
- Market regime detection is unsupervised, so the number and meaning of states are not known in advance.
- Estimated states can lag changes and depend on model choices, limiting their use as automatic trading overlays.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.