Markov-Switching GARCH Models

Fit (by Maximum Likelihood or MCMC/Bayesian), simulate, and forecast various Markov-Switching GARCH models as described in Ardia et al. (2017) <>.


Changes in Version 2.0 o Add do.cumulative boolean argument to Risk for aggregated in time risk measures computation. o Forecasts are now handle through the predict function. The predict function follows the standard stats::predict function. The Forecast method is thus discountinued. o Simulations are now handle through the simulate function and the Sim function is discountinued. Simulation ahead of a sample can be retreived via the predict function with the argument do.return.draw = TRUE. The simulate function follows the standard stats::simulate function. o Argument n.sim, n.mcmc, n.thin, n.burn, n.mesh, n.ahead, are now relabeled to nsim, nmcmc, nthin, nburn, nmesh, nahead, newdata for more standard labelling of argument. o The Pred function is now handle through the PredPDF function to avoid confusion with the function name Pred and predict (Pred was for Predictive Density). o AIC and BIC now use the stats::AIC and stats::BIC implementation thus removing the MSGARCH::AIC and MSGARCH::BIC function. Usage is unchanged. o Remove AIC and BIC functionalities for MSGARCH_MCMC_FIT object as it was not useful given the MSGARCH::DIC function. stats::AIC/BIC cannot handle the MSGARCH_MCMC_FIT version of AIC and BIC. o do.sort can now be configure in the FitMCMC ctr argument. do.sort indicate if the each paramater draw of the MCMC change should be
sorted conditional on the unconditional variance of each state (from low to high). This serve as to resolve label switching issue encountered in Markov-switching and mixture models bayesian estimation. Previous version of MSGARCH had this parameter set at TRUE at all time. The unsorted chain can now be outputted by setting do.sort = FALSE o Support for zoo and ts timeseries. When using MSGARCH functionality, if a ts or zoo object is passed as data, the date or index now appear in the output as well. For forecast, the date are continued from the last data of the time series with inrcement of 1 day. o do.cumulative is now available for PredPdf, PIT, and predict. Changes in Version 1.3 o Fix CRAN valgrind error o Solaris error fix o inst/test removed and moved to GitHub Examples folder o Added test Changes in Version 1.2 o Small improvements o Robustification of Hessian o Robustification of MCMC with Rcpp o Speedup examples Changes in Version 1.1 o New release on CRAN Changes in Version 1.00.1 o Vignette updated Changes in Version 1.00.0 o Vignette finalized o Packages new release o Several fixes and improvements Changes in Version 0.21.1 o Vignette updated Changes in Version 0.21.0 o Update vignetet o Fix sorting Changes in Version 0.20.7 o Update vignette o Update doc o Simplification of various outputs Changes in Version 0.20.6 o S3 names changes o improvements and fixes Changes in Version 0.20.5 o Several small fixes Changes in Version 0.20.1 o Doc improved o Ineq removed o Prior std to 10 Changes in Version 0.19.7 o Fixes by KB o Merging of R files Changes in Version 0.19.5 o New naming o GAS removed o Sigma0 removed Changes in Version 0.19.4 o New input parameters with control lists Changes in Version 0.19.2 o Fix bug related to object instantiation. No more random error on specification creation. Changes in Version 0.19.1 o Fix bug in MCMC estimation n-step ahead simulation Changes in Version 0.19 o Remove pdf and cdf since they were the same as pred and pit o Change how pdf and cdf function works: See example run_test_v0.19.R o Speed up risk measure calculation Changes in Version 0.18.3 o unconditional probabilities Changes in Version 0.18.2 o fix EM starting value Changes in Version 0.18.1 o added wrapper arround standardize distribution Changes in Version 0.18 o fix CRPS to be compatible with spec object Changes in Version 0.17.9 o add an option to modify the accptance rate of the adaptive sampler Changes in Version 0.17.8 o doc updated Changes in Version 0.17.7 o info updated Changes in Version 0.17.6 o additional checks for create.spec when failing to properly instanciate it Changes in Version 0.17.5 o fix ctr.deoptim in mle.R o unify of defaults inputs for the various classes Changes in Version 0.17.3 o fix bound problem Changes in Version 0.17.2 o crps function added o control parameters added to speedup for VaR calculation o vignette removed and cited in the documentation with appropriate reference o CITATION file modified o check for input of check.enhance.theta o change of optimization in do.enhance.theta Changes in Version 0.17 o fixed many bugs when the number of states were above 2. o changed MLE estimation scheme o function ht now output the conditional variance and not the conditional volatility o do.init is now FALSE by default o do.enhance.theta0 is now TRUE by default Known bugs in version 0.17 o sometimes do.enhance.theta0 gives an error concerning uniroot Changes in Version 0.16 o first release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.0 by Keven Bluteau, 3 months ago

Report a bug at

Browse source code at

Authors: David Ardia [aut], Keven Bluteau [aut, cre], Kris Boudt [ctb], Leopoldo Catania [aut], Brian Peterson [ctb], Denis-Alexandre Trottier [aut]

Documentation:   PDF Manual  

Task views: Empirical Finance

GPL (>= 2) license

Imports Rcpp, coda, methods, zoo, expm, fanplot, MASS, numDeriv

Suggests mcmc, testthat

Linking to Rcpp, RcppArmadillo

See at CRAN