I wish to understand some basic fact about the (primitive) simulation of stock prices with geometric Brownian motion.
If $S(t)$ is the stock price at time $t$, and the stock price follows geometric Brownian motion distribution, then it should satisfy $$dS(t) = S(t)\left(\mu dt + \sigma d B(t)\right)$$ where $B(t)$ is a standard linear Brownian motion, and $\mu$ is sometimes called drift. Solving this for $S(t)$ gives $$S(t) = S(0)\cdot \exp\left(\sigma B(t) + \left(\mu-\frac{\sigma^2}{2}\right)t\right)$$
Assuming there is no drift (there is no trend, perhaps), we obtain the following:$$S(t) = S(0)\cdot \exp\left(\sigma B(t) -\frac{\sigma^2}{2}t\right)$$ hence $$\ln\frac{S(1)}{S(0)} \sim \mathcal{N}(0,\sigma^2)-\frac{\sigma^2}{2}$$ and in particular \begin{eqnarray*} \mathbb{E}\left(\ln\frac{S(1)}{S(0)}\right) &=& \int_{-\infty}^\infty x\cdot\mathbb{P}\left(\mathcal{N}(0,\sigma^2) = x +\frac{\sigma^2}{2}\right) dx\\ &=& \int_{-\infty}^\infty x \cdot \frac{1}{\sigma\sqrt{2\pi}}\cdot\exp\left(-\frac{\left(x+\frac{\sigma^2}{2}\right)^2}{2\sigma^2}\right) dx \end{eqnarray*}
It looks like $$\mathbb{E}\left(\ln\frac{S(1)}{S(0)}\right) = -\frac{\sigma^2}{2}$$ which is what I would have expected. However, the more interesting expectation I couldn't compute: \begin{eqnarray*} \mathbb{E}\left(\frac{S_1}{S_0}\right) &=& \int_{-\infty}^\infty x\cdot \mathbb{P}\left(\exp\left(\mathcal{N}(0,\sigma^2)-\frac{\sigma^2}{2}\right)=x\right)dx\\ &=& \int_{-\infty}^\infty x\cdot\mathbb{P}\left(\mathcal{N}(0,\sigma^2)=\ln{x}+\frac{\sigma^2}{2}\right)dx\\ &=& \int_{-\infty}^\infty \frac{x}{\sigma\sqrt{2\pi}}\cdot \exp\left(-\frac{\left(\ln{x} + \frac{\sigma^2}{2}\right)^2}{2\sigma^2}\right)dx = ? \end{eqnarray*}
I would expect that expectation to be 1, as there is no drift. However, I can't do the integration. Is that true to assume that the result of the integral is 1?