Let’s assume a (weakly) stationary process $\{u_t\}$, such that the mean of $u_t$ and the covariance $(u_t, u_{t+h})$ do not depend on $t$. For simplicity, we assume that $E(u_t) = 0$. (Don't know how whether this is relevant.). Then my book makes the following step:
$$var(\sum^T_{t=1}u_t)=\sum^T_{t=1}\sum^T_{s=1}cov(u_s,u_t).$$ I don't understand this step. Isn't the variance the covariance with itself?
If the mean is zero or not (you can forget about all the right hand side term if it is) :\begin{align*} \mathrm{Var}\left[\sum_{t}^T u_t \right] &= \mathbb E\left[\left(\sum_{t}^T u_t\right)^2 \right]-\mathbb E\left[\sum_{t}^T u_t \right]^2\\ &=\mathbb E\left[\sum_{t}^T\sum_{\tau}^T u_t u_\tau \right]-\left(\sum_{t}^T \mathbb E\left[u_t \right]\right)^2\\ &= \sum_{t}^T\sum_{\tau}^T \mathbb E\left[u_t u_\tau \right]-\sum_{t}^T\sum_{\tau}^T\mathbb E\left[ u_t \right]\mathbb E[u_\tau]\\ &= \sum_{t}^T\sum_{\tau}^T\left[ \mathbb E\left[u_t u_\tau \right]-\mathbb E\left[ u_t \right]\mathbb E[u_\tau]\right]\\ &= \sum_{t}^T\sum_{\tau}^T \mathrm{Cov}[u_t, u_\tau]\\ \end{align*}
Note that this is independent of the definition of the $u_t$, in particular it works even if you don't have stationarity.