Introduction
Markovswitching models offer a powerful tool for capturing the realworld behavior of time series data. Today's blog provides an introduction to Markovswitching models including:
 What a regime switching model is and how it differs from a structural break model.
 When we should use the regime switching model.
 What a Markovswitching model is.
 What tools we use to estimate Markovswitching models.
What Is A Regime Switching Model?
Traditional time series models assume that one set of model parameters can be used to describe the behavior of the data over all time. This assumption isn't always valid for what we encounter in realworld data.
Realworld time series data may have different characteristics, such as means and variances, across different time periods. Regimeswitching models:
 Characterize data as falling into different, recurring “regimes” or “states”.
 Allow the characteristics of time series data, including means, variances, and model parameters to change across regimes.
 Assume that at any given time period there is a probability that the series may be in any of the regimes and may transition to a different regime.
These components can allow regime change models to better capture the true behavior of realworld data than standard models.
How Are Regime Change Models Different Than Structural Break Models?
At first glance, it can be difficult to distinguish regime change models from structural break models. They both allow for changes in the underlying model of time series data. However, there are distinct differences:
Structural Break Models vs. Regime Change Models 


Regime Change Models  Structural Break Models  


In a way, we can think of structural change models as a very special case of regime change models, in which each possible "regime" occurs only once.
When Should You Use Regime Switching Models?
Regime switching models are most commonly used to model time series data that fluctuates between recurring "states". Put another way, if we are working data that seems to cycle between periods of behavior, we may want to consider a regime switching model.
Example Applications of Regime Change Models 


Underlying cause  Description 
Financial crises.  Many economic time series behave differently in times of financial stability than financial crisis. 
Economic downturns.  The behavior of economic time series are characterized differently in periods of economic expansion versus economic recession. 
Changes in tax policies.  Household behavior, such as income allocation between consumption and saving, changes depending on tax policy regimes. 
Hyperinflation.  Economic fundamentals behave differently in periods of hyperinflation and "normal" rates of inflation. 
The MarkovSwitching Model
The Markovswitching model is a popular type of regimeswitching model which assumes that unobserved states are determined by an underlying stochastic process known as a Markovchain.
What is a Markovchain?
A Markovchain is a stochastic process used to describe how uncertain and unobserved outcomes occur. In the case of the Markovswitching model, it is used to describe how data falls into unobserved regimes. A Markovchain has the property that future states are dependent only on present states (this is known as the Markov property).
A key characteristic of a Markovchain is the transition probabilities. The transition probabilities describe the likelihood that the current regime stays the same or changes (i.e the probability that the regime transitions to another regime).
The Components of the MarkovSwitching Model
The complete Markovswitching model includes:
 An assumed number of regimes.
 A dependent variable.
 Independent variables.
 Parameters relating the dependent variable to the independent variables for each regime.
 Transition probabilities.
 Statistical inferences on the model parameters and the determined states.
How Are MarkovSwitching Models Estimated
Markovswitching models are usually estimated using:
Maximum Likelihood Estimation of Markovswitching Models
Maximum likelihood estimation of Markovswitching models utilizes an iterative algorithm known as expectationmaximization. The expectationmaximization algorithm is data analysis for models where there is a latent (unobserved) variable in the model. This method was first proposed by John Hamilton in 1990.
The expectationsmaximization algorithm broadly involves two steps:
 Estimating the latent variable. This is known as the EStep.
 Estimating the parameters of the model given the value of the latent variable. This is known as the Mstep.
In the context of the MarkovSwitching model, this means we:
 Use a filteringsmoothing algorithm, such as the Kalman smoother, to propose the path of the unobserved variable.
 Use maximum likelihood, given the current regime, to estimate the model parameters, including the transition probabilities.
 Repeat steps 1 & 2 using updated parameter estimates until convergence.
Bayesian Estimation of MarkovSwitching Models
Bayesian estimation of Markovswitching models relies on drawing samples from a joint distribution of the parameters, states, and transition probabilities using a Markov Chain Monte Carlo method (MCMC). This method benefits from the fact that the likelihood function for the model doesn't have to be directly calculated.
A common tool used for Bayesian estimation of the Markovswitching models is the Gibbs sampler.
Conclusion
Congratulations! In today's blog, you learned the basics of the power Markovswitching model. After reading this blog, you should have a better understanding of:
 What a regime switching model is and how it differs from a structural break model.
 When to use a regime switching model.
 What a Markovswitching model is.
 What tools we use to estimate Markovswitching models.
Eric has been working to build, distribute, and strengthen the GAUSS universe since 2012. He is an economist skilled in data analysis and software development. He has earned a B.A. and MSc in economics and engineering and has over 15 years of combined industry and academic experience in data analysis and research.