# Autocovariance of time integrated Ornstein-Uhlenbeck process

if $X(t)$ is the Ornstein-Uhlenbeck process and $Y(t)$ the time integrated OU process I am trying to calculate the autocovariance $cov(Y_t, Y_s)$.

I have a bunch of results but I don't know how to connect them. First in this post they treat the OU process and it's also the result of the variance: $$Var(Y_t) = \mathbb{E} Y_t^2 = \mathbb{E} \int_0^t \int_0^t X_s X_u ds du = \int_0^t \int_0^t Cov(X_s, X_u) ds du = 2 \int_0^t \int_0^u Cov(X_s, X_u) ds du.$$

and they use $Cov(X_s, X_u) = \frac{\sigma^2}{2\theta}\left( e^{-\theta(u-s)} - e^{-\theta(u+s)} \right)$ for $s\leq u$. And in that case the result is $$Var(Y_t)=\frac{\sigma^2 t}{\theta^2}-\frac{3\sigma^2}{2 \theta^3}+\frac{\sigma^2}{2 \theta^3}(4 e^{-\theta t}-e^{-2 \theta t})$$

The thing is that (if I am not wrong) the way to calculate the autocovariance is using a similar integral but with different limits. I am not sure about this but I was thinking in $Cov(Y_t,Y_v)=\mathbb{E} \int_0^t \int_0^v X_s X_u ds du$ but I am not completely sure.

And in that case I don't know how to solve the integral because I have to respect the validity of the formula of the covariance for $s \leq u$

On the other hand I also found the following result[Bhattacharya] : $$Cov(Y_t, Y_{t+v}-Y_t)=\frac{\sigma^2}{2 \theta³}(1-e^{-\theta v}) (1-e^{-\theta t})^2$$

And also I was thinking in using that $$Cov(Y_t, Y_{t+v}-Y_t) = Cov(Y_t, Y_{v+t}) - Var(Y_t)$$ But again, I am not completely sure about this, and if this is true, there is a way to solve the integral and have the same result.

Any help would be really appreciated.

REF: Bhattacharya, Stochastic Processes with Applications

• Hint: break the double integral into two regions, one with $s \le u$ and the other with $s \ge u$. – Nate Eldredge Nov 17 '16 at 16:02
• By the way, I think $s,t,u$ are mixed up in a couple places. You might want to proofread carefully. – Nate Eldredge Nov 17 '16 at 16:03

Since everything in sight has mean zero, the covariance is given by $\mathbb{E}[Y_t Y_v]$. Without loss of generality, assume $t \ge v$. Then \begin{align*} \mathbb{E}[Y_t Y_v] &= \mathbb{E}\left[\int_0^t X_s\,ds \int_0^v X_u\,du\right] \\ &= \mathbb{E}\left[\int_0^v \int_0^t X_s X_u\,ds\,du\right] \\ &= \int_0^v \int_0^t \mathbb{E}[X_s X_u]\,ds\,du && \text{(Fubini)} \\ &= \int_0^v \left(\int_0^u \mathbb{E}[X_s X_u]\,ds + \int_u^t \mathbb{E}[X_s X_u]\,ds\right)\,du. \end{align*} Now use the formula you know for the covariance of $X_s$ and $X_u$. In the first integral you have $s \le u$, so use your formula as is, and in the second integral $u \ge s$, so use your formula with $u$ and $s$ reversed. The calculus is then an exercise.
• Thank you very much. If anyone needs the results $Cov(Y_t, Y_{t+\tau})= \frac{\sigma^2}{2 \theta^3}( -e^{-\sigma (2t+\tau)} - 2 e^{-\theta t} + 2 e^{-\theta (t+\tau)} -2 - e^{-\theta \tau} + 2t\theta )$ – Iván Dec 14 '16 at 9:53