Markov switching models or more generally regime switching models (MSM, RSM) can be seen as extensions to an arbitrary model that performs well in certain scenarios, but fails when applied to a larger data set due to its temporal non-stationarity. RSMs address this issue by assuming that there are multiple underlying states of the system that switch between them according to a certain stochastic process.
The Idea is similar to the state space models from 3.3, however here state (or regime) isn’t a continuous variable, but has a finite number of values (e.g., “bull market” and “recession”). MSMs assume that evolution of the regime is a Markov process. That means for each pair of regimes there is a fixed probability of a transition from one state to another and in each point of time the model decides whether it will change the state randomly according to these probabilities and independent of the history.
The simplest example would be a CAPM model from 3.1 (for simplicity just AAPL vs. SPY) with two regimes and transition probabilities p12 (from recession to growth), p21 (from growth to recession) and probabilities to stay within each regime p11,p22. Of course we can work with more than two regimes and models beyond the linear regression (as far as we know how to fit them).
regime 1: Y AAPL = β Y SPY + α for t during recession t1t1
regime2:YAAPL=βYSPY +α for t during growth t2t2
Currently we are using tsa.regime switching module from statsmodel library allowing to infer the parameters for multiple regression and auto-regression models including the transition probabilities. Also the library hmmlearn is worth mentioning (was part of scikit-learn until deprecated in the 0.17 release). Stata is commercial statistical software with their implementation of Markov switching regression models. We mention it here because of their good documentation stata.com/manuals14/tsmswitch.pdf.
As we mentioned, MSMs can act as an add-on for many models allowing them to differentiate between different model regimes. Therefore the application field of these models is quite broad. For us the most important of them is recession outlook and risk measurement (that can be again used for many downstream tasks), for others we leave references to the most recent work utilizing RSMs on the corresponding field.
For many financial data sets fitting a MSM with two regime results in two parameter sets (e.g,. two sets of auto-regression parameters) where one corresponds to a model describing market behavior during recession and growth period. As we know we learn the transition probabilities together with the model parameters, but it is also possible to compute the probabilities of being in a certain regime for each time step. This values (e.g., probability of being in the “recession” regime, see Figure 3.4) can be interpreted as a risk measure and used further for tasks like portfolio or trading optimization.
About the IMM International Market Merchants:
IMM International Market Merchants is a FinTech Software Development Vendor/ Automating Financial Services, Investment Management, Quantitative Trading
Disclosure: Interactive Brokers
Information posted on IBKR Traders’ Insight that is provided by third-parties and not by Interactive Brokers does NOT constitute a recommendation by Interactive Brokers that you should contract for the services of that third party. Third-party participants who contribute to IBKR Traders’ Insight are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.
This material is from IMM International Market Merchants and is being posted with permission from IMM International Market Merchants. The views expressed in this material are solely those of the author and/or IMM International Market Merchants and IBKR is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to sell or the solicitation of an offer to buy any security. To the extent that this material discusses general market activity, industry or sector trends or other broad based economic or political conditions, it should not be construed as research or investment advice. To the extent that it includes references to specific securities, commodities, currencies, or other instruments, those references do not constitute a recommendation to buy, sell or hold such security. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.
In accordance with EU regulation: The statements in this document shall not be considered as an objective or independent explanation of the matters. Please note that this document (a) has not been prepared in accordance with legal requirements designed to promote the independence of investment research, and (b) is not subject to any prohibition on dealing ahead of the dissemination or publication of investment research.
Any trading symbols displayed are for illustrative purposes only and are not intended to portray recommendations.
Disclosure: Displaying Symbols on Video
Any stock, options or futures symbols displayed are for illustrative purposes only and are not intended to portray recommendations.