[Math] Expected value of time integral of geometric brownian motion

stochastic-calculus

Given that the stochastic process follows,

$$
\frac{dS_t}{S_t} = \mu dt + \sigma dW_t
$$

How do i calculate the expected value of,

$$
\int_0^T S_te^{r(T-t)} dt
$$

in terms of T.

What I tried was the below,

$$
\begin{align}
\int_0^T S_te^{r(T-t)} dt &= \left[ -\frac{1}{r}S_te^{r(T-t)}\right]_0^T + \frac{1}{r}\int_0^T e^{r(T-t)} dS_t\\
&=\frac{1}{r}\left[ S_Te^{rT}-S_T \right] + \frac{\mu}{r} \int_0^T S_te^{r(T-t)} dt + \frac{\sigma}{r} \int_0^T S_te^{r(T-t)} dW_t\\
\Rightarrow \left( 1-\frac{\mu}{r}\right) \int_0^T S_te^{r(T-t)} dt &= \frac{1}{r}\left[ S_Te^{rT}-S_T \right] + \frac{\sigma}{r} \int_0^T S_te^{r(T-t)} dW_t\\
\int_0^T S_te^{r(T-t)} dt &= \frac{1}{r-\mu}\left[ S_Te^{rT}-S_T \right] + \frac{\sigma}{r-\mu} \int_0^T S_te^{r(T-t)} dW_t\\
\Rightarrow \mathbb{E}\left[\int_0^T S_te^{r(T-t)} dt\right] &= \frac{1}{r-\mu}\left[ e^{rT}-1 \right]\mathbb{E}[S_T]
\end{align}
$$

Can anyone verify if what I did was correct?

Best Answer

Assuming $T$ is just a number and not a stopping time, $$ E\int_0^T S_t e^{r(T-t)}dt $$ is just just a double integral of a positive function, so we can exchange the order of integration $$ = \int_0^T E [S_t] e^{r(T-t)} dt $$ $$ = \int_0^T S_0 e^{\mu t} e^{r(T-t)}dt $$ and I presume you can finish from here as nothing left is random.