MSVARlib Version 2.0 - For Gauss users

MSVARlib is a new open source Gauss library to estimate Multivariate Markov-Switching regression Models in their most generic specification. These new programs are based upon the works of Hamilton (1994) and Krolzig (1998) and allow assessment of models with M states through classical optimization of the maximum likelihood method. The modular architecture of the program is presented in a first part. It has been designed to allow new improvements (generalized non linear MS models or enhancement to a Bayesian framework).


This package is, by no means, finished and a comprehensive enhancement "to do list" remains to be done. If you plan to extend the library, find any problems or have suggestions for improvement please contact the author.

Download !

Installation Instructions

This package has been developed thanks to the programs of Roncalli (1995), the theoretical work of James Hamliton (1994) and Krolzig (1997). The first version "MSVARlib 1.0" was written in May 2004 in the GAUSS ® matrix language. The current version has not only been tested on GAUSS® 3.2, 5.0 and 6.0 but is now OX-GAUSS compliant. It has been corrected in a 1.1 version from some flaws thanks to Sebastien Laurent's help. You can check on Sebastien's web-site which is full of resources about OX and Econometrics methods. Sebastien has recently developped a package routine for OX gauss to bridge the gap between cml, maxlik, optmum and Ox : M@ximize. For more information about the latest version of OX, click here.


To install and run these programs, you must absolutely create a directory C:\GAUSS\MSVAR where you should unzip the MSVARlib package. This package includes two directories, a readme file and this paper:

- the MSLIB directory includes programs and saved output results,

- the DATA directory includes input data files,

- a data sample spreadsheets MSVARLIb_data.xls with convenient templates,

- a Readme.txt exhibiting basic installation instructions.

For detailed information, please refer to :  "Classical Estimation of Multivariate Markov-Switching Models with MSVARlib "

MSVARlib Version 2.0 - For Scilab users

Since November 2006, MSVARlib is available in the SCILAB environment thanks to the hard work of Eric Dubois. MSVARlib functions have been included in the version 1.2 of the GROCER toolbox. Grocer is a dedicated econometric package which significantly increase the appeal of Scilab to applied econometricians. There are 3 different high level functions that estimate a MS model in grocer: the most general one, called ms_reg and two particular cases, ms_mean and ms_var. There is also a low level function ms_estimate, that estimates a MS model but with restrictions on the data which can only be in a matrix form. MS-Models available in the Gauss package and the related paper:  "Classical Estimation of Multivariate Markov-Switching Models with MSVARlib " can now be estimated for free, and in a very accessible way. Many thanks to Eric !

Download GROCER and MSVARLIB for Scilab !



| Home / Contact info | Working papers and Publications | MSVARlib Gauss open source Library |Business Cycle Economics |Leading US recession index |