[R] mean reverting model

andrew andrewjohnroyal at gmail.com
Tue Mar 10 01:59:20 CET 2009


Autoregression is more general than the (discretized) Ornstein
Uhlenbeck process.  For a start, a discretized version of the Ornstein-
Uhlenbeck is just an AR(1) process X(n+1) = X(n) + a (X(n) - mu) +
error(n+1), but with the coefficient a restricted to 0 < a < 1.  This
restriction is necessary as the OU process is continuous and reverts
to its mean mu.

You can get a translation between the coefficients of an OU process
and an AR process by just equating coefficients on like terms.  This
shouldn't be more difficult that a bunch of linear equations.

On Mar 10, 11:06 am, markle... at verizon.net wrote:
> i think there's confusion here between a time series that reverts to its
> long term mean
> and an "ornstein uhlenbeck" type of mean reversion. they're not the same
> thing and
> I don't want to go into the difference because I would probably just add
> to the confusion.
>
> you might be better off sending your original question to the
> R-Sig-Finance list although
> you may have already because I saw something abiout the same topic
> earlier ?
>
> If you google for ornstein uhlenbeck, there should be something
> somewhere on the net that shows that a discrete version of an ornstein
> uhlenbeck is think a an AR(2) with some complex parameters which are
> functions of the volatility and mean reverting parameter of the
> continuous OU process. I googled earlier because I was going to send it
> to you but the site where I wanted to go was busy. I think it's called
> planetmath.org or something like that.
>
> On Mon, Mar 9, 2009 at  7:54 PM, andrew wrote:
> > Autoregression is just X(n+1) = a X(n) + b + error.  The mean
>
> reverting model is when |a| < 1.  Estimation is carried out using
>
> x_ar <- ar(x)
> summary(x_ar)
>
> standard error is found in the square root of the diagonal of the x_ar
> $asy.var.coef matrix.
>
> please read the documentation found at ?ar to get full details.
>
> On Mar 10, 9:18 am, Josuah Rechtsteiner <rechtstei... at bgki.net
> <mailto:rechtstei... at bgki.net>   <mailto:rechtstei... at bgki.net> > wrote:
>
>
>
> > hi andrew,
>
> > the problem is that I don't know what kind of model this exactly is...
> > I only know that I have to do it this way and how the model is  
> > structured.
>
> >> Mean reverting model = autoregression?  If so, then search for
>
> >> ?ar
>
> >> or
>
> >> ?arima
>
> >> to fit a time series.
>
> >> On Mar 10, 4:36 am, Josuah Rechtsteiner <rechtstei... at bgki.net
> >> <mailto:rechtstei... at bgki.net>   <mailto:rechtstei... at bgki.net> >
> >> wrote:
> >>> dear useRs,
>
> >>> i'm working with a mean reverting model of the following  
> >>> specification:
>
> >>> y = mu + beta(x - mu) + errorterm, where mu is a constant
>
> >>> currently I estimate just y = x (with lm()) to get beta and then
> >>> calculate mu = estimated intercept / (1-beta).
>
> >>> but I'd like to estimate mu and beta together in one regression-step
> >>> and also get the test-statistics (including parameter variance) for
> >>>  
> >>> mu
> >>> as well as for beta in the summary of the regression.
>
> >>> could you please help me?
>
> >>> thanks very much in advance!
>
> >>> josuah
>
> >>> ______________________________________________
> >>> R-h... at r-project.org <mailto:R-h... at r-project.org>  
> >>> <mailto:R-h... at r-project.org>  mailing
> >>> listhttps://stat.ethz.ch/mailman/<https://stat.ethz.ch/mailman/>  
> >>> <https://stat.ethz.ch/mailman/> listinfo/r-help
> >>> PLEASE do read the posting
> >>> guidehttp://www.R-project.org/posting-guide.html
> >>> <http://www.R-project.org/posting-guide.html>  
> >>> <http://www.R-project.org/posting-guide.html> and provide commented,
> >>> minimal, self-contained, reproducible code.
>
> >> ______________________________________________
> >> R-h... at r-project.org <mailto:R-h... at r-project.org>  
> >> <mailto:R-h... at r-project.org>  mailing list
> >>https://stat.ethz.ch/mailman/listinfo/r-help
> >> <https://stat.ethz.ch/mailman/listinfo/r-help>  
> >> <https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the
> >> posting guidehttp://www.R-project.org/posting-guide.html
> >> <http://www.R-project.org/posting-guide.html>  
> >> <http://www.R-project.org/posting-guide.html> and provide commented,
> >> minimal, self-contained, reproducible code.
>
> > ______________________________________________
> > R-h... at r-project.org <mailto:R-h... at r-project.org>  
> > <mailto:R-h... at r-project.org>  mailing
> > listhttps://stat.ethz.ch/mailman/listinfo/r-help
> > <https://stat.ethz.ch/mailman/listinfo/r-help>  
> > <https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the
> > posting guidehttp://www.R-project.org/posting-guide.html
> > <http://www.R-project.org/posting-guide.html>  
> > <http://www.R-project.org/posting-guide.html> and provide commented,
> > minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-h... at r-project.org <mailto:R-h... at r-project.org>  
> <mailto:R-h... at r-project.org>  mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> <https://stat.ethz.ch/mailman/listinfo/r-help>  
> <https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> <http://www.R-project.org/posting-guide.html>  
> <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list