Markov Regime-Switching Model (MS-AR / MS-VAR)

Econometrics
Introduced by
Hamilton (1989); Kim & Nelson (1999)
Year
1989
Type
Regime-switching time series model

What does it do?

The Markov regime-switching model lets the parameters of a time series change across hidden regimes that evolve as a first-order Markov chain.

Hamilton (1989) introduced this approach to represent occasional, discrete shifts in the growth rate of a nonstationary series, and Kim and Nelson (1999) extended the framework in a book covering classical and Gibbs-sampling estimation. The model infers which regime was most likely active at each time point, which is why it is widely used to date business-cycle phases.

The intuition behind the method

Imagine the economy quietly switching between a few unobserved states, such as a calm growth regime and a turbulent recession regime, each with its own typical behaviour. You never observe the switch directly. The data simply look different in each state, and the chance of staying in or leaving a state is governed by fixed transition probabilities. The model infers, for every time point, which hidden regime was most likely active and how the dynamics differ between regimes.

History

James Hamilton introduced Markov regime switching in his 1989 Econometrica paper, which modelled occasional discrete shifts in the growth rate of a nonstationary series and presented algorithms for inferring the unobserved shifts. These algorithms also permit maximum likelihood estimation of the parameters, and the filtering recursion is now known as the Hamilton filter. Kim and Nelson (1999) later presented the framework in a book on state-space models with regime switching, covering both classical and Gibbs-sampling approaches together with applications.

When to use it

Choose a Markov-switching model when a continuous time series plausibly moves between a small number of distinct, recurring regimes, such as expansion and recession phases in macroeconomic output or calm and turbulent periods in financial returns. The series must be long enough for each regime to recur several times and for the regime-specific parameters to be estimated; the required length depends on how often each regime recurs and on the number of parameters per regime. You need to fix the number of regimes k in advance and justify that choice. The method suits regime dating, forecasting and explanatory work. Do not use it when a single permanent change at an unknown date is the more plausible story, since a structural-break model fits that better, and avoid it for short samples or when no recurring regimes are expected, because the regime-specific parameters then cannot be estimated reliably.

Limitations and considerations

  • The number of regimes k must be chosen by the analyst; the estimation procedure does not determine it.
  • The likelihood is multimodal, so estimates can depend on starting values and may settle at a local optimum rather than the global maximum.
  • Parameters are identified only through the way the data switch between states, so the regimes have no fixed economic meaning until the analyst interprets them.
  • Estimating a separate set of parameters for each regime requires a fairly long series; if a regime is visited only rarely, its parameters may not be estimated reliably.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Identifies recurrent regimes and dates them from the data itself, so phases such as expansions and contractions do not have to be labelled by hand. Hamilton's 1989 application treated the periodic shift to negative growth as a recurrent feature of the U.S. business cycle.
  • The regime-specific intercept, autoregressive coefficients and error variance allow both the mean dynamics and the volatility to differ across states, which a single-regime autoregression cannot represent.
  • Gives a probabilistic regime assignment for each time point rather than a single hard split of the sample.

Applications

  • Dating business-cycle expansions and contractions in macroeconomic series, including using a regime shift in growth rates as a criterion for recessions, as Hamilton's 1989 paper suggests.
  • Detecting calm versus turbulent volatility regimes in financial returns and exchange rates.
  • Modelling time series whose mean, persistence or variance shifts between recurring states.

How it works

How it works

1

Within each regime the series follows its own autoregressive process, with a regime-specific intercept c_{S_t}, regime-specific autoregressive coefficients phi_{i,S_t} (where the subscript i denotes the lag), and a regime-specific error variance sigma^2_{S_t}. The hidden state S_t gives the active regime at time t. The standard specification assumes that the autoregressive dynamics within each regime are stationary, that the errors are conditionally normal with regime-specific variance, and that the number of regimes k is fixed before estimation.

Formula
y_t = c_{S_t} + \sum_{i=1}^{p}\phi_{i,S_t}\,y_{t-i} + \varepsilon_t,\quad \varepsilon_t \sim \mathcal{N}(0,\sigma^2_{S_t})
2

The hidden state follows a first-order Markov chain: the probability of moving from regime i to regime j in one period is p_ij, and the probabilities from each regime sum to one. As written in the model formula, these transition probabilities are assumed constant over time. They control how persistent each regime is, since a large p_ii means the process tends to remain in regime i.

Formula
P(S_t = j \mid S_{t-1} = i) = p_{ij},\quad \sum_{j=1}^{k} p_{ij} = 1
3

Because the regimes are unobserved, the parameters are estimated by maximum likelihood. The likelihood sums over the regimes, weighting each regime's density by its predictive probability given the data up to t-1. The Hamilton filter updates these probabilities recursively as each new observation arrives, and the same recursion produces the likelihood. Bayesian Gibbs-sampling approaches are an alternative estimation route. Standard errors should be reported alongside the parameter estimates: a textbook worked example of the Hamilton business-cycle model reports quasi-maximum likelihood standard errors next to its estimates.

Formula
\hat{\theta} = \arg\max_{\theta}\sum_{t} \log\!\Big(\sum_{S_t=1}^{k} f(y_t \mid S_t;\theta)\,P(S_t \mid y_{1:t-1})\Big)

Common pitfalls

  • Specifying too many regimes produces small states with few observations; these are often poorly identified and may not reproduce out of sample.
  • Reading a hard regime label from a probability near 0.5 ignores the real uncertainty about which regime was active in that period.
  • Trusting a single estimation run. Because the likelihood is multimodal, compare results from several starting values before interpreting the regimes.
  • Applying the model to a series too short for each regime to recur enough times, relative to the number of parameters per regime.
  • Assuming the estimated regimes match the economic phases you expect. The regimes are defined only by the fitted dynamics, so their labels and timing should be checked against external evidence.
  • Confusing filtered and smoothed regime probabilities. Filtered probabilities use only data up to time t and are the real-time quantities produced by the Hamilton filter; smoothed probabilities use the full sample and are usually reported when dating past regimes. State which one a result reports.
  • Expecting better out-of-sample forecasts than simple benchmarks. In some applications, such as exchange rates, a Markov-switching model has been found to forecast worse than a random walk out of sample, and using more than two regimes was suggested as one way to improve it. Check forecast accuracy against a simple benchmark.

Frequently asked questions

How many regimes should I use?

The number of regimes k is set by the analyst, not learned from the data. Two regimes, for example expansion and contraction, is the classic choice. When comparing candidate models, information criteria such as AIC or BIC can help, but their standard justification relies on regularity conditions that can fail in regime-switching models, because the regime structure is not identified under the null of a single regime. Combine them with out-of-sample checks and economic interpretability, and avoid adding regimes that capture only a handful of observations.

What is the hidden Markov chain doing?

It governs which unobserved regime is active at each time point. Movement between regimes follows transition probabilities p_ij, so each regime has a degree of persistence, and the model infers the probability of each regime from the observed data.

How is the model estimated when the regimes are unobserved?

By maximum likelihood. The Hamilton filter recursively updates the probability of each regime as new observations arrive and uses these probabilities to form the likelihood. Bayesian Gibbs sampling is an alternative. Because the likelihood is multimodal, it helps to try several starting values.

How is this different from a structural-break model?

A structural-break model assumes a one-off, permanent change at an unknown date. A Markov-switching model lets the series move back and forth between recurring regimes probabilistically, which fits cyclical phenomena such as business cycles.

Related methods

Sources

  1. Hamilton, J. D. (1989). A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle. Econometrica, 57(2), 357-384.

    Open DOI reference
  2. Kim, C. J. & Nelson, C. R. (1999). State-Space Models with Regime Switching: Classical and Gibbs-Sampling Approaches with Applications. MIT Press.

    ISBN: 978-0262112383