# Calibrating the Ornstein-Uhlenbeck process with an additional parameter

Firstly I find the spread between two cointegrated time-series $$Y_t$$ and $$Z_t$$ by finding the best slope parameter $$\beta$$ in the equation $$spread_t = Y_t - \beta Z_t$$ (via Cointegrated Dickey-Fuller Test). Then I say $$spread_t = X_t$$ and fit my Ornstein-Uhlenbeck model as described below.

I then have a mean-reverting Ornstein-Uhlenbeck process $$X_t$$ described by an SDE $$dX_t = \lambda (\mu - X_t) dt + \sigma dW_t \tag{1}$$

where the parameters are:

• $$\lambda > 0$$ : mean reversion coefficient
• $$\mu \in \mathbb{R}$$ : long-term mean
• $$\sigma > 0$$ : volatility coefficient

I use an exact discretization for this process:

$$X_{t+1} = X_ie^{-\lambda\delta}+\mu(1-e^{-\lambda\delta}) +\sigma \sqrt{\frac{1-e^{-2\lambda\delta}}{2\lambda}}N_{0,1}$$ where $$N$$ is a standard normal distribution.

To calibrate the process in order to find the parameters, I set a log-likelihood function of a set of observations that is derived from the conditional density function:

$$\mathcal{L}(\mu, \lambda, \hat{\sigma})=\sum_{i=1}^{n} \ln f\left(X_{i} X_{i-1} ; \mu, \lambda, \sigma\right) \\ =-\frac{n}{2} \ln (2 \pi)-n \ln (\hat{\sigma}) -\frac{1}{2 \hat{\sigma}^{2}} \sum_{i=1}^{n}\left[X_{i}-X_{i-1} e^{-\lambda \delta}-\mu\left(1-e^{-\lambda \delta}\right)\right]^{2}.$$

We then find the three parameters by equating each partial derivative of the log-likelihood function to zero (w.r.t to each parameter).

My question is the following:

Would it be valid to skip the first step, i.e. the cointegration step and find the $$\beta$$ at the same time as the Ornstein-Uhlenbeck parameters. So I would then have

$$d(Y_t - \beta Z_t) = \lambda (\mu - (Y_t - \beta Z_t)) dt + \sigma dW_t$$ (since I set $$X_t = (Y_t - \beta Z_t)$$ in $$(1)$$ above) as my Ornstein-Uhlenbeck process.

I would then find a new log-likelihood function that also includes the parameter $$\beta$$: $$\mathcal{L}(\mu, \lambda, \hat{\sigma}, \beta) = \dots$$

I am not sure this makes sense, since before we fully knew what the $$X_t$$ process was (a given time-series we want to model) but now our $$X_t$$ process is $$X_t=Y_t - \beta Z_t$$ where $$\beta$$ is unknown.

It's difficult to follow parts of your question because of the notation. Throughout your formulas, I'm not sure where $$X_t$$ is an input to your regression and $$X_t$$ is what you've defined as spread. At least, that’s my excuse if I don’t answer your question properly.
Using MLE to estimate $$\beta$$ won't answer whether or not your two time series are covariance-stationary. That's what your Dickey-Fuller test is doing. If you're just doing the first step in testing for cointegration, that is, performing a linear regression without an intercept and then modeling the residuals as an OUP, then sure, you can manipulate the pdf you're maximizing:
$$f(X_t;Y_t|X_{t-1};Y_{t-1})=\frac{1}{2\pi\sigma^2}e^{-\frac{1}{2}*\frac{(Y_t - \beta X_t - Y_{t-1} + \beta X_{t-1} -\lambda(\mu-Y_{t-1}+\beta X_{t-1})^2}{\sigma^2}}$$
While you can test if the two methods yield equivalent coefficients, you shouldn't necessarily expect the same $$\beta$$. The intercept you excluded in your initial regression will be baked into your conditional mean. It’s the same premise as saying that l can expect the coefficient of a regression sans intercept to be different than one including an intercept.
• Apologies for the notation, I just realised I re-used $X_t$. I will edit the question now and $X_t$ is always the spread which is equal to $Y_t - \beta Z_t$ where $Y_t$ and $Z_t$ are two given time-series. – MilTom Jan 24 at 17:45
• So basically the $\beta$ I get from the modified pdf doesn't need to be the one which makes the two time-series cointegrated. If that is the case, why would I expect the same coefficients then if the $\beta$ is different to the one from Dickey-Fuller test? A different $\beta$ will give a completely different process in my view with different OU coefficients – MilTom Jan 24 at 17:50
• You’re correct. Sorry if I wasn’t clear. By “baked into your conditional mean” I meant that your $\mu$ and $\lambda$ would change. And the $\beta$ you get would be the one you got from your step 1 if your process does not have a drift term and the residuals are normally distributed (if the actual process has the same underlying assumptions required by OLS) because you have set up your initial step to assume no drift. Basically, by having a 2 step process, you can more easily control how beta is calibrated using your prior knowledge. – Mild_Thornberry Jan 24 at 19:38