Markov-Switching Model

markov-switchingregime-switchingstate-spacenonlinear-time-seriesbusiness-cyclehamilton-filterbayesianmaximum-likelihood

Definition

A Markov-switching (or regime-switching) model is a state-space model in which the parameters governing the observation density depend on a discrete latent state StS_t that evolves as a first-order Markov chain. Conditional on the regime, the data are described by an ordinary linear-Gaussian model; marginally, the model captures abrupt structural shifts — recessions, exchange-rate regimes, high- vs. low-volatility episodes — that a single-regime model cannot. Introduced to econometrics by Hamilton (1989), the framework replaces the continuous latent state of a linear state-space model with a finite collection of regimes, so the conditional likelihood is computed by a discrete analogue of the Kalman filter known as Hamilton's filter.

Key Ideas

How It Works

State-Space Form

The canonical Hamilton (1989) switching-mean autoregression writes a series as deviations from a regime-dependent mean:

ytμSt=k=1rϕk(ytkμStk)+εt,εtN(0,σ2)y_t - \mu_{S_t} = \sum_{k=1}^{r} \phi_k\,(y_{t-k} - \mu_{S_{t-k}}) + \varepsilon_t, \qquad \varepsilon_t \sim \mathcal{N}(0, \sigma^2)

with μSt=μ0+μ1St\mu_{S_t} = \mu_0 + \mu_1 S_t and St{0,1}S_t \in \{0,1\}. The pair (observation equation, Markov state equation) is a state-space system; the only departure from the linear-Gaussian case is that the "state" StS_t is discrete.

Hamilton's Filter (Conditional Likelihood)

The filter recursively tracks the probability of each regime given data through tt. Starting from the chain's stationary distribution:

  1. Prediction: Pr(St=jYt1)=ipijPr(St1=iYt1)\Pr(S_t = j \mid Y_{t-1}) = \sum_{i} p_{ij}\,\Pr(S_{t-1} = i \mid Y_{t-1})
  2. Update after observing yty_t: Pr(St=jYt)=f(ytSt=j,Yt1)Pr(St=jYt1)kf(ytSt=k,Yt1)Pr(St=kYt1)\Pr(S_t = j \mid Y_t) = \frac{f(y_t \mid S_t = j, Y_{t-1})\,\Pr(S_t = j \mid Y_{t-1})}{\sum_{k} f(y_t \mid S_t = k, Y_{t-1})\,\Pr(S_t = k \mid Y_{t-1})}

The denominator is the one-step predictive density of yty_t, so the sample log-likelihood accumulates as

(θ)=t=1Tlog ⁣[jf(ytSt=j,Yt1)Pr(St=jYt1)],\ell(\theta) = \sum_{t=1}^{T} \log\!\left[\sum_{j} f(y_t \mid S_t = j, Y_{t-1})\,\Pr(S_t = j \mid Y_{t-1})\right],

which is maximised numerically to obtain the maximum likelihood estimator (MLE). This parallels the Kalman filter's prediction-error decomposition, with summation over discrete regimes replacing the Gaussian integral.

Smoothing

Full-sample regime inference Pr(St=jYT)\Pr(S_t = j \mid Y_T) comes from a backward pass (Kim 1994 smoother), the discrete analogue of the Rauch-Tung-Striebel Kalman smoother.

Estimation Strategies

Why It Matters

Open Questions

Related