I am looking for a R library for modeling a Markov-Switching E-GARCH process.

In other questions at StackExchange related to GARCH models, the package rugarch is often mentionned. Do you recommend it in my case?

I would like that R library I am seeking had the following features:

  • allows to observe/control the volatility term structure
  • allows to impose long-term volatility
  • has calibration routines
  • includes forecasting procedures

In fact, I would like to carry out a volatility analysis work à la Carole Alexander, as described in her book Market Risk Analysis Volume II: Practical Financial Econometrics.

Thank you.

  • $\begingroup$ I don't think Markov-switching GARCH models are implemented in R as of now. "rugarch" is indeed a good package for univariate GARCH (and ARFIMA) models, and "rmgarch" is a useful package for multivariate GARCH models, but there is no Markov switching there. What do you mean exactly by "impose long-term volatility"? $\endgroup$ Commented Feb 25, 2016 at 19:37
  • 1
    $\begingroup$ @RichardHardy: Now they are, please see my answer below: quant.stackexchange.com/a/33609/12 $\endgroup$
    – vonjd
    Commented Apr 10, 2017 at 19:48
  • 1
    $\begingroup$ @vonjd, thank you, it will be interesting to take a look. $\endgroup$ Commented Apr 11, 2017 at 5:17

1 Answer 1


There is now a package for that: The MSGARCH package, you can find it on CRAN.

You can find an exhaustive vignette here:

David Ardia, Keven Bluteau, Kris Boudt, Denis-Alexandre Trottier: Markov-Switching GARCH Models in R: The MSGARCH Package (2016)


Markov-switching GARCH models have become popular to model the structural break in the conditional variance dynamics of financial time series. In this paper, we describe the R package MSGARCH which implements Markov-switching GARCH-type models very effficiently by using C object-oriented programming techniques. It allows the user to perform simulations as well as Maximum Likelihood and Bayesian estimation of a very large class of Markov-switching GARCH-type models. Risk management tools such as Value-at-Risk and Expected-Shortfall calculations are available. An empirical illustration of the usefulness of the R package MSGARCH is presented.

For modelling EGARCH you set model = "eGARCH" in the create.spec function (see p. 2 in the abovementioned vignette).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.