# Distribution of Geometric Brownian Motion

Please let me know where I have been mistaken!

Let the SDE satisfied by the GBM $S(t)$ be $$\frac{dS(t)}{S(t)} = \mu dt + \sigma dW(t).$$

Then, the underlying BM $X(t)$ will satisfy $$dX(t) = \left( \mu - \frac{1}{2} \sigma^2 \right)dt + \sigma dW(t).$$

To simulate the GBM for times $t_0 < t_1 < \ldots < t_n$, generate $n$ iid $\mathcal{N}(0,1)$ RVs, $Z_i$, $\quad i = 1,2,\ldots, n$ and set

$$S(t_{i+1}) = S(t_i)\exp\left(\left( \mu - \frac{1}{2} \sigma^2 \right)(t_{i+1} -t_i) + \sigma \sqrt{t_{i+1} - t_i} Z_{i+1} \right).$$ Then $$\frac{S(t)}{S(0)} = \exp\left(\underbrace{\left(\mu - \frac{1}{2} \sigma^2\right) t + \sigma \sqrt{t}Z}_{\mathcal{N}\left(\left(\mu - \frac{\sigma^2}{2}\right)t, \sigma^2 t\right)} \right)$$ and so $$\log \frac{S(t)}{S(0)} \sim \mathcal{N}\left(\left(\mu - \frac{\sigma^2}{2}\right)t, \sigma^2 t\right).$$

I think I'm missing something because when I use this mean and variance (in the equation directly above) for testing the normality of the log returns ($\log \frac{S(t)}{S(0)}$), I get ridiculous answers.

To be specific, with $S_0 = 20$, $\mu = 2$, $\sigma^2 = 1$ and partitioning $[0,1]$ into 100 subintervals, generating the GBM at these 100 points gives a range of values from 15.399 to 97.1384 for the $S(t_i)$. Then the log returns, $\log S(t_i)/S_0$, range from -0.26143 to 1.5804. The means I'm using for each $\log S(t_i)/S_0$ are (in increasing order of $i$) $0.015, 0.03, 0.045, \ldots, 1.5$ and the variances are $0.01,0.02, \ldots, 1$ since these are the parameters in the supposed normal distribution as described above. Finally, when these log returns are normalized using this mean and variance their values range from -2.7643 to 0.080404, which is clearly not $\mathcal{N}(0,1)$-distributed.

UPDATE: The test I am using to test for normality (Anderson-Darling) relies on independent samples from a (supposed) normal distribution, and as a couple people have pointed out in the comments, $\log S(t_i)/S_0$ is dependent on $\log S(t_{i-1})/S_0$. Indeed, changing to testing returns of the form $\log S(t_i)/S(t_{i-1})$ results in a "pass" for the Anderon-Darling test (giving $A^2 = 0.244$ for those familiar).

-
could you perhaps elaborate on how you are testing the normality :) I can't really see a problem with the derivation so perhaps the test itself is a bit off – Probilitator Mar 9 '14 at 15:54
@ bcf : Hi in what context are you testing normality ? Is it on time series of quoted index or stock, or is it in a Monte Carlo simulation that you have done yourself ? Best regards – TheBridge Mar 9 '14 at 17:20
Anderson-Darling test. I'm partitioning $[0,1]$ into 100 intervals and generating the GBM at those points, then performing the Anderson-Darling test for these 100 random variables. – bcf Mar 9 '14 at 17:58
Just added specifics to my normality test in the problem description. – bcf Mar 9 '14 at 18:09
I'm not familiar with the specifics of the Anderson-Darling test but it seems that it is based on the empirical cdf of an iid sample. I'm wondering if you took into account that by considering the $\log(S_i/S_0)$ instead of the $\log(S_i/S_{i-1})$, your sample is not iid. Even if you normalise your data so that each follows an $N(0,1)$, they will never be independant since the log-return during the period $[0,i/100]$ clearly depends on the log-return during $[0,(i-1)/100]$. – AFK Mar 10 '14 at 1:59

$$\sqrt{t_{i+1}-t_i}z_i+\sqrt{t_{i}-t_{i-1}}z_{i-1}\neq \sqrt{t_{i+1}-t_{i-1}}\left(z_i - z_{i-1}\right)$$ is that what you meant? If so hover over the comment and see mathjax markdown :). – Chinny84 Jan 14 '15 at 21:41