This paper documents MSGARCH, an R package (with an efficient C++ object-oriented backend) that implements Markov-switching GARCH models. It lets the user simulate from, and estimate — by both maximum likelihood and Bayesian Markov chain Monte Carlo — a very large class of single-regime and Markov-switching GARCH-type models, combining several conditional-variance specifications with several conditional distributions. It provides single- and multi-step-ahead forecasts of the complete conditional density, and risk-management tools for conditional volatility, value-at-risk (VaR), and expected shortfall (ES), with backtesting. The functionality is illustrated on exchange-rate and stock-market return data.
"The package MSGARCH allows the user to perform simulations as well as maximum likelihood and Bayesian Markov chain Monte Carlo estimations of a very large class of Markov-switching GARCH-type models."
This is the software that turned Markov-switching GARCH from a methods-paper technique into something a practitioner can actually run. Its most consequential design choice is using the path-independent regime-specific formulation (à la Haas–Mittnik–Paolella) rather than the natural path-dependent model of Bauwens–Preminger–Rombouts — that is exactly what makes both the ML likelihood and the MCMC tractable at package scale, and it's the practical resolution of the path-dependence problem. Offering ML and Bayesian estimation in one interface, plus full predictive densities and VaR/ES backtesting, makes it a natural companion to the theory pages and a bridge to the applied risk-management literature. As a Journal-of-Statistical-Software artifact its value is reproducibility rather than a new result, but that is precisely what the methodology needed.