A silly question that is bugging me. I am working my way through Baxter and Rennie (again) and I am getting my wires crossed on the short rate models in particular the straight forward Ho and Lee analysis.
So given the SDE (under the $\mathbb{Q}$ measure) $$ dr_t = \sigma dW_t +\theta_t dt $$ where $\theta_t$ is both deterministic and bounded and $\sigma$ is constant. This becomes $$ r_t = f(0,t) + \sigma W_t +\int_0^t \theta_s ds $$ (I hope).
How do I compute the integral $$ \int_t^T r_sds $$
Basically it comes down to computing $$ \int_t^T W_sds $$ and $$ \int_t^T \int_0^s \theta_k dk. $$ From first integral is just book work (though it be nice to see a derivation here other than by parts?) It is the later which I am not sure about, as the result is apparently $$ \int_t^T (T-s)\theta_s ds $$ Which I am puzzled by?
$\textbf{edit}$ Actually an important piece of information is that I am trying to compute $$ -\log\mathbb{E}_{\mathbb{Q}}\left(\mathrm{e}^{-\int_t^T r_sds}\vert r_t = x\right)=x(T-t) -\frac{1}{6}\sigma^2 (T-t)^3 + \int_0^T (T-s)\theta_sds $$