# GBM in R giving negative numbers?

I was under the impression that simulations involving geometric brownian motion are not supposed to yield negative numbers. However, I was trying the following Monte Carlo simulation in R for a GBM, where my initial asset price is: $98.78$, $\mu = 0.208$, $\sigma = 0.824$. I initialized my dataframe as such: (I am just doing 1000 simulations over 5 years, simulating the price each year)

V = matrix(0, nrow = 1000, ncol = 6)
V_df = data.frame(V)


Then:

V[, 1] <- 98.78


I then perform the simulations (with $dt = 1$):

for (i in 1:1000) {
for (j in 1:5) {
V_df[i,j+1] <- V_df[i,j]*(mu*dt + sigma*sqrt(dt)*rnorm(1)) + V_df[i,j]
}
}


When I then check $V_{df}$ there are many negative entries. Would anyone have an idea as to why this is so?

Thanks.

• You're using an iteration scheme to simulate a GBM. Since you are taking discrete time steps instead of infinitesimal steps, there's always the possibility of rnorm(1) being sufficiently negative that it generates a negative value for your asset price. Just decrease the step size. – Raskolnikov Jun 16 '18 at 4:47
• A $\sigma$ value of 0.824 is pretty high, seems feasible that a discretized approximation might yield negative numbers. Change $\mu$ to 0.05 and $\sigma$ to 0.20 to see more reasonable numbers. – user217285 Jun 16 '18 at 6:04

So you'd use $V_{t_2} = V_{t_1} . e^{(\mu-\frac{\sigma^2}{2})(t_2-t_1)+\sigma(W_{t_2}-W_{t_1})}$
Where $W_{t_2}-W_{t_1} \sim N(mean=0,var=t_2-t_1)$