View on GitHub


CRAN DownloadsDownloads Pending Pull-Requests Github Issues


Markov-switching GARCH models have become popular to account for regime changes in the conditional variance dynamics of financial time series. The R package MSGARCH (Ardia et al., 20xx) implements Markov-switching GARCH-type models very efficiently by using C++ object-oriented programming techniques. It allows the user to perform simulations as well as Maximum Likelihood and MCMC/Bayesian estimations of a very large class of Markov-switching GARCH-type models. The package also provides methods to make single-step and multi-step ahead forecasts of the complete conditional density of the variable of interest. Risk management tools to estimate conditional volatility, Value-at-Risk and Expected Shortfall are also available.


The latest stable version of MSGARCH is available on CRAN and can be installed via:

  R > install.packages("MSGARCH")

To install the latest development version of MSGARCH (which may contain bugs!) use these lines:

  R > install.packages("devtools")
  R > require("devtools")
  R > devtools::install_github("keblu/MSGARCH", subdir="Package")


Please cite MSGARCH in publications:

Ardia, D., Bluteau, K., Boudt, K., Catania, L., Trottier, D.-A. (20xx).
Markov-switching GARCH models in R: The MSGARCH package.
Forthcoming in Journal of Statistical Software.

Ardia, D., Bluteau, K., Boudt, K., Catania, L. (2018a).
Forecasting risk with Markov-switching GARCH models: A large-scale performance study.
International Journal of Forecasting, Vol 34, Issue 4, pp. 733-747.

Ardia, D., Bluteau, K., Ruede, M. (2018b).
Regime changes in Bitcoin GARCH volatility dynamics.
Forthcoming in Finance Research Letters.


The MSGARCH core team is grateful to Samuel Borms, Peter Carl, Yohan Chalabi, Dirk Eddelbuettel, Alexios Ghalanos, Richard Gerlach, Laurent Fastnacht, Félix-Antoine Fortin, Lennart Hoogerheide, Rob J Hyndman, Eliane Maalouf, Brian Peterson, Tobias Setz, Enrico Schumann, Diethelm Wuertz, and participants at the R/Finance 2017 conference (Chicago), the 37th International Symposium on Forecasting (Cairns), UseR 2017 (Brussels), Quant Insights 2017 (London), MAFE 2018 (Madrid), eRum 2018 (Budapest), and seminar participants at HEC Li`ege, Paris–Dauphine, and IAE–AMSE Aix– Marseille. We acknowledge Industrielle-Alliance, International Institute of Forecasters, Google Summer of Code 2016 & 2017, FQRSC (Grant # 2015-NP-179931), and Fonds des Donations at the University of Neuchâtel for their financial support, and Calcul Québec for computational support.

Core Team

David Ardia (University of Neuchâtel)

David Ardia is Assistant Professor of Finance at the University of Neuchâtel, Switzerland, and Visiting Professor of Finance at Laval University, Québec, Canada. Previously he was senior analyst at aeris CAPITAL AG and head of research at Tolomeo Capital AG, two Swiss-based asset managers. In 2008 he received the Chorafas Prize for his book Financial Risk Management with Bayesian Estimation of GARCH Models, published by Springer. He is the author of several scientific articles and statistical packages in R. He holds an MSc in applied mathematics, an MAS in quantitative finance, and a PhD in financial econometrics.

Keven Bluteau (University of Neuchâtel)

Keven Bluteau is PhD student in Finance at the University of Neuchâtel and Vrije Universiteit Brussel. He obtained his BSc and MBA from Laval University. His research is centered on risk management and sentiment analysis applied to finance. He is the co-author of the R statistical packages MSGARCH and NSE.

Kris Boudt (Vrije Universiteit Brussel)

Kris Boudt is Associate Professor in Finance at Vrije Universiteit Brussel and Amsterdam. He is a research partner of Finvex, instructor at Datacamp, affiliated researcher at KU Leuven and guest lecturer at the University of Illinois at Chicago, Southwestern University of Finance and Economics and the University of Aix-Marseille. Kris Boudt has published in leading international finance and statistics journals including the Journal of Econometrics, International Journal of Forecasting, Journal of Financial Econometrics, Journal of Financial Markets, Journal of Portfolio Management, Review of Finance and Statistics and Computing, among others. Kris Boudt has a passion for developing financial econometrics tools in R.

Leopoldo Catania (Aarhus University)

Leopoldo Catania is Assistant Professor in Econometrics at Aarhus University, School of Business and Social Sciences. His research interests focus on Financial Econometrics and Time Series Analysis. His works concern the development and the estimation of univariate and multivariate econometrics models applied to quantitative risk management, density predictions of financial returns, time-varying dependence and volatility. Some of the models he works with are Hidden (Semi-) Markov Models, Dynamic Mixture Models and Generalized Autoregressive Score (GAS) models.