Home

Awesome

MS_Regress-Matlab

This repository provides functions (and examples scripts) for the estimation, simulation and forecasting of a general Markov Regime Switching Regression in Matlab.

Before using the package, make sure you read the pdf file (About the MS_Regress_Package.pdf) in the downloaded zip file. A copy of this paper can be found in SSRN.

Be aware that this Matlab code is no longer being maintained. I switched to R back in 2015 and never looked back..

Instalation

First, clone this repository or download it as a zip file (see download choice in right side button of the webpage).

Matlab works by reading files in the search path. In order to use the functions of MS_Regress, all you need to do is to tell matlab to look for the files in the m_Files folder (e.g. addpath('m_Files') of the zip file. After that, all functions will be available to the user.

The easiest way to get started is to run the example scripts provided in the root folder. They should work as is, without any modification. You can modify the examples for you own dataset and custom model.

I also wrote a R version of the package (fMarkovSwitching). It is public available in the R Metrics project and in R Code section of my website. Please be aware that the R version in no longer being maintained so it is actually an older version of the matlab package with only the basic features.

Features of the package:

Limitations of the package (so far):

Required Products:

Optimization, Statistics

Versions

Revision 17/04/2017 (ver 1.11)

Revision 19/04/2015 (ver 1.09)

Revision 30/10/2014 (ver 1.08)

Revision 21/02/2014 (ver 1.07)

Revision 15/07/2013 (ver 1.06)

Revision 20/05/2013 (ver 1.05)

Revision 25/01/2013 (ver 1.04)

Revision 13/01/2013

Revision 19/09/2012

Revision 19/09/2012

Revision 09/08/2012

Revision 30/05/2012

References:

Alexander, C. (2008) ‘Market Risk Analysis: Practical Financial Econometrics’ Wiley.

Brooks, C. (2002) ‘Introduction to Econometrics’ Cambridge University Press.

Hamilton, J., D. (2005) Regime Switching Models. Palgrave Dictionary of Economics, (available at http://dss.ucsd.edu/~jhamilto/palgrav1.pdf )

Hamilton , J., D. (1994) ‘Time Series Analysis’ Princeton University Press.

Kim, C., J., Nelson, C., R. (1999) State Space Model with Regime Switching: Classical and Gibbs-Sampling Approaches with Applications. The MIT press.