# Calibrating OU parameters using AR(1)

I have a mean reverting time series and want to find the Ornstein-Uhlenbeck (OU) parameters of it. I researched the internet and found that we can calibrate the model as a simple AR(1) process, $$\text dS_{t} = \lambda(\mu-S_t)\text dt+\sigma \text dW_t,$$ where $$\lambda$$ is the mean reversion rate, $$\mu$$ the mean and $$\sigma$$ the volatility.

The exact solution of the above SDE is \begin{align*} S_{i+1} = S_i e^{-\lambda\delta} + \mu(1-e^{-\lambda\delta}) + \sigma \sqrt{\frac{(1-e^{-2\lambda\delta})}{2\lambda}}N_{0,1}, \tag{1} \end{align*} where $$\delta$$ is a small time increment.

An AR(1) process is \begin{align*} S_{i+1} = aS_i+b+\varepsilon. \tag{2} \end{align*} Comparing the AR(1) process with the exact solution of the SDE, we can get the following relations \begin{align*} \lambda &= -\frac{\ln a}{\delta} \tag{3} \\ \mu&=\frac{b}{1-a} \tag{4} \\ \sigma &= \text{stdev}(\epsilon) \sqrt{\frac{-2\ln a}{\delta(1-a^2)}} \tag{5} \end{align*}

I fitted a simple OLS model for (2) and $$a$$ turns out to be negative (e.g., $$a=-0.03$$). We can neither obtain $$\lambda$$ nor $$\sigma$$ as they have $$\ln(a)$$ and we cannot take log of a negative value.

My question is very similar to link. I looked into these supporting stack exchange links (1, 2, 3) but none of the links could give a solution to my issue

Also I understand when estimating half life using AR(1) we should use $$-\frac{\ln(2)}{\ln(|a|)}$$ and half life of OU is $$\frac{\ln(2)}{\lambda}$$. Associated link. Should I take absolute value of $$a$$ in Equations (3) and (5)?

• Hi. You didn't explain what data you used to get the AR(1) estimate. You should be generating data using the OU model and then estimating using the AR(1) on the simulated OU data. Also, don't use OLS because it will give biased estimates. I would use an AR function in whatever language you are working in, say R or Python. Mar 11, 2021 at 17:11
• @markleeds Why would OLS give a biased estimate of the parameter (as opposed to the standard error)?
– John
Aug 9, 2021 at 13:16
• Hi John: Someone proved it in a thread somewhere on cross-validated but I'm not sure where. It has to do with the lagged dependent variable being on the RHS but I don't remember the details. Maybe someone in this group can prove it. I'm not upto the task, atleast at the moment. An MLE approach may have some bias also but it's still better from an efficiency standpoint compared to OLS, atleast for small samples. Aug 9, 2021 at 18:40