I have a geometric Brownian motion as a simple model for asset prices described by the Itô stochastic differential equation:
$dS_t$=$\mu\ S_tdt$+ $\sigma\ S_tdW_t$
where
$\mu\ $= 0.5 , $\sigma\ $= 0.3 , $0<t<2$.
Initial condition $S_0$=$1$
and I was wondering how to find $E(S_t)$ and $Var(S_t)$ analytically
Short answer:
Using Ito's lemma to solve the geometric stochastic differential equation gives us that the solution is $$S_t = S_0 e^{(\mu - \frac{1}{2}\sigma^2)t + \sigma W_t}.$$
The general formula for mean and variance of stock price $S_t$ following geometric stochastic differential equation are $$E[S_t] = S_0 e^{\mu t} \quad \text{and} \quad Var(S_t) = S_0^2 e^{2\mu t}( e^{\sigma^2 t} - 1).$$ So, substituting the values of $S_0 = 1, \mu = 0.5, \sigma = 0.3$ gives us that $$E[S_t]=e^{\frac{1}{2}t} \quad \text{and}\quad Var(S_t)=e^t( e^{0.09 t} - 1).$$
Long answer:
I am going to provide a proof on the formula for mean and variance above.
Recall that for any $X\sim N(\mu,\sigma),$ we can write $$X = \mu + \sigma Z$$ where $Z\sim N(0,1).$ So, $$E[e^{X}] = E[e^{\mu + \sigma Z}] = e^{\mu} E[e^{\sigma Z}] = e^\mu\cdot e^{\frac{\sigma^2}{2}} = e^{\mu + \frac{\sigma^2}{2}}.$$ Therefore, we have $$E[S_t] = S_0 e^{(\mu - \frac{1}{2}\sigma^2)t} E[e^{\sigma W_t}] = S_0 e^{(\mu - \frac{1}{2}\sigma^2)t} e^{\frac{1}{2}\sigma^2 t} = S_0 e^{\mu t}.$$ On the other hand, we have $$E[S_t^2] = E[S_0^2 e^{(\mu - \frac{1}{2}\sigma^2)2t + 2\sigma W_t}] = S_0^2 e^{(\mu - \frac{1}{2}\sigma^2)2t}E[ e^{ 2\sigma W_t}] = S_0^2 e^{(\mu - \frac{1}{2}\sigma^2)2t} e^{\frac{1}{2}4\sigma^2 t} = S_0^2 e^{2\mu t + \sigma^2 t}.$$ Hence, $$Var(S_t) = E[S_t^2] - [E(S_t)]^2 = S_0^2 e^{2\mu t + \sigma^2 t} - S_0^2 e^{2\mu t} = S_0^2 e^{2\mu t}( e^{\sigma^2 t} - 1).$$