negative values in geometric brownian motion

A GBM (Geometric Brownian Motion)

$$\frac{dx}{x} = \mu dt + \sigma dW$$

solves to

$$x_t = x_o e^{(\mu - \sigma^2)t + \sigma W_t}$$

From the solution, it is clear that $$x_t$$ cannot become negative. However, it is not so clear from the SDE. In fact, if I do simulations using the SDE, x very frequently becomes negative for certain parameter combinations.

Is the non-negativity of $$x_t$$ valid only in case $$dt->0$$

Here is one simulation:

• Your discretization appears wrong. For example, E3 = E2+ E2 * D3 = E2 * (1+D3). Jan 28, 2019 at 19:26
• Thanks @Gordon Edited. Issue is still the same Jan 28, 2019 at 19:35
• You formula is still incorrect: E2 is $x_t$ whereas D3 gives you $\Delta_t=\text{d}x_t/x_t$ thus in E3 you should have E2+E2*D3 ($x_t+x_t\Delta_t$) instead of D2+E2*D2 ($\Delta_t+x_t\Delta_t$). Jan 28, 2019 at 20:00
• Why not simulate d log x? That's more stable and I think avoids the issues you're having.
– user34971
Jan 29, 2019 at 2:13

I agree with wrong formula in simulation, but think i understand the question. Here's my take on it:

The reason SDE may seem to allow a negative value of x is because dW can be a large negative number, and thus can move x from positive to negative values. If that's the confusion, that is justified only in discrete case.

Do a thought experiment. Imagine the transition point of x from positive to negative in discrete case. Now, to move closer to the continuous case, you can decrease dt and imagine x as going from positive to zero first, and then to negative. But your SDE states that dx = x multiplied by something. So when x->0, dx also ->0. This should help you understand that the negative values are only coming from discretization of an otherwise continuous process.

Now, if you fix your formulas in the simulation and make it E3= E2+ D2*E2 (instead of D2+ D2*E2 which you used), you can still get negative values if sigma is really large and dt is not small enough. But try changing dt relative to sigma and you will find it harder to get negative values. Moreover, excel might have a limit of how small you can go.

Hope it helps.