# Regime switching in mean reverting stochastic process

Let you have a mean reverting stochastic process with a statistically significant autocorrelation coefficient; let it looks like you can well model it using an $ARMA(p,q)$.

This time series could be described by a mean reverting stochastic process like

$dS=k(\theta-S_{t})dt+\sigma S_{t}^{\beta}dz$

where $\theta$ is the mean reversion level, $k$ is the speed of mean reversion and $\beta$ determines the structural form of diffusion term (so $\beta=0$ yields the normally distributed mean reversion model, aka the Ornstein-Uhlenbeck process).

Regardless of the actual value of $S_{0}$, we know $S_{t}$ will go $\theta$ in the long run, right?

Now let there's an unlikely event which can drastically change $\theta$'s value: e.g. let $\theta=100$, you model the process, ok, then... bang! Starting from $t=\tau$ it happens that $\theta=30$ and you will have to deal with this new scenario.

My question: is there any model which can deal with such a situation?

• I'm sure there are, as this would seem key to model risk in the real world. I believe I remember seeing them way back when I knew this when regime-switching was a hot topic (maybe late '90s). But except for this: scholar.google.com/…, I can only recommend to check the usual suspects in mathematical finance.
– gnometorule
Jan 7 '13 at 17:08
• This is not a 'regime switching' model, but a 'structural breaks' model. Regime switching models move between states within the sample. What you describe is a one-off structural break. Oct 31 '15 at 9:45

As far as I can tell, you've essentially written the model that you are concerned with. The only difference is that you would instead have $\theta_{i}$ when $s_{t}=i$ where $s_{t}$ is a latent variable that reflects the probability of being in state $i$. You would also need to include the dynamics that drive the probability transitions as another part of the model. You could set them up as standard Markov Regime-Switching models are set up, though there are other options.

So the question becomes what do you want to do with the model?

If you are concerned with estimating the parameters of such a model, you would begin by setting this up as a regime-switching AR(p) model (these are more popular to use than ARMA models). You could set it up in levels and allow the coefficients on all the variables (and the variance) to switch between states. You could also set it up in differences and include the lag of the level as an independent variable.

To estimate the parameters, the simplest approach is to apply maximum likelihood using the Hamilton filter. There is a Matlab implementation that I have used to implement this approach. You could also estimate the regime-switching model by Bayesian MCMC.

• I like your answer, John, and I think your approach may produce suitable results. Let me answer your question: «So the question becomes what do you want to do with the model?». I'm working with a 2-regime model and my final goal is to estimate the $S_{t}$ value which is the threshold between the first and the second regime. E.g.: if $S_{t}>60$ it's likely it will go $\theta=100$ BUT if $S_{t}<60$ it's likely it will go $\theta=25$. What should I do? Jan 10 '13 at 14:03
• You might want to learn more about regime-switching. Also, try to fit one of the models using that Matlab package to get a better sense of what you're dealing with.
– John
Jan 10 '13 at 17:04
• I'm used to R for quantitative analysis. Please, give a look at Regime Detection: it is a blog article on regime switching detection. Is that the kind of analysis you're suggesting to perform? Jan 11 '13 at 14:26
• This is closely related, but I'm not sure whether that R package can fit autoregressive models that you are looking to fit.
– John
Jan 11 '13 at 17:55
• The short name usually used to describe such a model is "TAR" (Threshold Autoregressive Model), isn't it? If so, how a TAR model can perform if the time series sample shows just the first regime (but we know also the second one does exist)? Jan 14 '13 at 7:36