How to compute the following covariance? $\alpha(t),\beta(t)$ are two stochastic process.
How to prove the following equation:
$$cov\left(\int_0^T\alpha(s)\,ds,\int_0^T\beta(s)\,ds\right)=2\int_0^T\int_0^tcov\left(\alpha(s),\beta(s)\right)\,ds\,dt$$
My idea:by Riemann sum,and change the order of integral and limit
Is there any more elegant proof?
 A: As stated, the result is incorrect. Consider the shared probability space with respect to which the stochastic processes are defined, and assume the following integrability  conditions for the processes: $\alpha, \beta \in\mathbb L^2_{[0,T]\times\Omega}(\lambda\otimes\mathbb P)$. Here, $\lambda$ is the $1$-dimensional Lebesgue measure, while $\Omega$ and $\mathbb P$ are the underlying sample space and probability measure, respectively. Then, using Fubini's theorem, we see that
$\begin{array}{rll}
{\bf C}\text{ov}(\int_0^T \alpha_s\text ds,\ \int_0^T \beta_r\text dr) & = &\mathbb E[\int_0^T \alpha_s\text ds\int_0^T \beta_r\text dr] - \mathbb E[\int_0^T \alpha_s\text ds]\mathbb E[\int_0^T \beta_r\text dr] \\ &=& \mathbb E[\int_0^T\int_0^T \alpha_s\beta_r\text ds\text dr]-\int_0^T \mathbb E[\alpha_s]\text ds\int_0^T \mathbb E[\beta_r]\text dr \\& = &\int_0^T\int_0^T \mathbb E[\alpha_s\beta_r]\text ds\text dr-\int_0^T \int_0^T \mathbb E[\alpha_s]\mathbb E[\beta_r]\text ds\text dr \\ &=& \int_0^T\int_0^T (\mathbb E[\alpha_s\beta_r]-\mathbb E[\alpha_s]\mathbb E[\beta_r])\text ds\text dr \\ &=& \int_0^T\int_0^T {\bf C}\text{ov}(\alpha_s,\ \beta_r) \text ds\text dr
\end{array}$
That is,

$${\bf C}\text{ov}\left(\int_0^T \alpha_s\text ds,\ \int_0^T \beta_r\text dr\right) = \int_0^T\int_0^T {\bf C}\text{ov}(\alpha_s,\ \beta_r) \text ds\text dr$$

In particular,
$ \begin{array}{rll}{\bf V}\text{ar}(\int_0^T \alpha_s\text ds) &=& \int_0^T\int_0^T {\bf C}\text{ov}(\alpha_s,\ \alpha_r) \text ds\text dr \\&=& \int_0^T\int_0^r {\bf C}\text{ov}(\alpha_s,\ \alpha_r) \text ds\text dr + \int_0^T\int_r^T {\bf C}\text{ov}(\alpha_s,\ \alpha_r) \text ds\text dr \\&=& \int_0^T\int_0^r {\bf C}\text{ov}(\alpha_s,\ \alpha_r) \text ds\text dr +  \int_0^T\int_0^r {\bf C}\text{ov}(\alpha_s,\ \alpha_r) \text ds\text dr\\ &=&2\int_0^T\int_0^r {\bf C}\text{ov}(\alpha_s,\ \alpha_r) \text ds\text dr
\end{array}$
A: a more elegant proof (or more intuitive) one would have to use information about the stochastic processes (i assume they are stationary, not mentioned).
else one can use covariance definition and just change (or merge) the two integrals (this is a by-definition proof and using analytic properties of the integral, it might be elegant as well)
