# 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?

-

– gnometorule Jan 7 at 17:08

## 1 Answer

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? – Lisa Ann Jan 10 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 at 17:04
I'm used to `R` for quantitative analysis. Please, give a look at : it is a blog article on regime switching detection. Is that the kind of analysis you're suggesting to perform? – Lisa Ann Jan 11 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 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)? – Lisa Ann Jan 14 at 7:36
show 1 more comment
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 22, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9523858428001404, "perplexity_flag": "head"}