We continue with our last OBSSESION…
trying to capture an index trend but at the moment, not playing with future information.
We are going to introduce the Markov Switching Regimes (MSR) model which, as its name indicates, tries to capture when a regimen has changed to another one. This would be a change between opposite trends or it could consist in passing from “being in trend” to “not being in trend” and vice versa.
The name of Markov could sound familiar to some of you as j3 introduced what the Markov chains were a couple of years ago. The main characteristic of this stochastic process is that in a stage t, the probability of occurrence only depends on what happened in the immediately previous stage, t-1. In our post we will assume that the trend of an index today will depend only on which trend was living yesterday, this means, the index will be governed by a Markov chain. In particular, our Markov chain will be formed by two possible stages, bullish and bearish trends, both will constitute the regimes modelled and predicted by MSR models.
The process we have designed in order to perform our task is, schematically, next one:
Two regimes described by two stock indexes
Our interest is to classify trends, particularly trends of Standard and Poor’ s 500 Index and for this purpose, we will define two regimes based in the causality between Euro Stoxx 50 and Standard and Poor’s 500:
r_{SPX,t }= a_{k }+ b_{k }* r_{STX,t }+ e_{k,t }, k=1,2 (= two possible values of the states S)
You will be probably asking why I haven’t used only the own Standard and Poor’s 500 as an explicative variable. In fact I have tried to estimate an AR model in which the explicative variable is Standard and Poor’s 500 itself with one (or more) lag (lags) shifted from the endogenous variable but the fitting is not good enough, as my other colleague, psanchezcri, showed in his last post . This is the reason why I decide to give a try to the use of models mixing S&P 500 and Euro Stoxx 50. In fact, this relationship worked not bad in my last post.
How does MSR process work?
Let’s call p_{ij} the probability to be in the regime i at time t and come to regime j at t+1, this is called the conditional probability. Remember again that the probability to be at t+1 in some state conditioned to the states which have been lived in t, t-1,t-2,t-3… depends only on what happened on t because we are supposing our process to be a Markov Chain:
P(S_{t} = i |S_{t-1} = j, S_{t-2} = k, S_{t-3} = l,…) = P(S_{t} = i |S_{t-1} = j) = p_{ij}
Starting to explain all the details of MSR method with pure formalism would be tedious for the most of you and I don’t want you to lose the attention paid until now so for more information I strongly recommend you to read the famous book of Hamilton (Time series analysis, chapter 22 (1994)) to learn how this process works and how we can use both probabilities p_{ij} and the regression estimate between Euro Stoxx 50 and Standard and Poor’s in order to get the series of historic unconditional probabilities at every step t:
Unconditional Probability (t) = p ( S_{t} = x | all the information known at time t)
x = 1 (bullish) or 2 (bearish)
But do we already know that these regimes will match with a trend classification?
The most important aspect you must keep in mind is that “a priori” we can’t force one of the regime to be exactly the bullish or bearish one. This method will return us a classification of our series and we will finally check if it fits with a trends classification. So if we talk about a bullish (bearish) regime, notice that despite this name, we already don’t know if the final classification will be the trend classification we want to get. However, we can guide the models estimate to have “characteristics” that suit with an up/down trends…how to get this?
- One idea: force the regimes to have constants with different sign (an easy way to get this is taking proper transformations of these constants and once the estimate is done, undo the transformations). The idea is think that the regime with positive constant could describe upward trends while the other could describe downward ones.
- Another idea: the experience shows us that uptrends are longer and more “clear” (with less contrarian movements against the sense of the trend) so our initial value set for will be 95% (supposing that 1=uptrend) but for the other regime we set 70% as its initial probability condition. This means that we are stablishing that continuing in a bullish regime is much more likely to happen than in a bearish trend and vice versa: going out from a bearish trend is more likely to happen than in an uptrend one.
And once the estimate is obtained… how is our bet?
Once we have the time series estimate of the unconditional probabilities, one regime with positive constant and negative for the other one, we set the next rule in order to bet:
“if one of the probabilities is above 70% (so the other is below 30%) we bet for this sense of trend (bullish or bearish, depending on which probability has the higuer value). If this does not occur, we don’t bet for trend so we figure that the state for the index is ranged marked”.
We have applied this and the coincidence with a method that cheats classifying trends using information unknown at the time (the same method I have been using as my peer in the comparisons of my last posts) is …
…54%.
Despite we show a light bias in favor of success predicting trends, we find this method not very robust as we have checked that a little change of the initial values of the probabilities generates results different enough. For example, if we increase the conditional value given to the transition probability of the regime we want to be the bearish one (set as 70%, as we have already told), the series of unconditional probabilities obtained are not very reliable as they show jumps in the frequencies of their values:
Another aspect that makes this result not reliable is that we were expecting to see less S&P 500 volatility in the regimen assumed to be the bullish one and the opposite in the bearish one, but this does not occur with high constancy, let’s see:
So…
To continue giving a try to this technique, we should look for extensions of this method: what about increasing the number of states or describing the regimes with other models? We will continue looking for one version with better results than the obtained in last posts. See you next time!