Markov Switching Models for Statsmodels Installation Place in your project folder. Compile the Cython filter using python setup.py build_ext --inplace