Miracle
04-03-2017, 08:32 AM
I would like to simulate a geometric Brownian motion for 20,000 trajectories with VBA. Since the number of trajectories is huge, doing it by hand would be troublesome.
The formula is as follows
X(n) = X(n-1) + u*X(n-1)*Delta_t + Sigma*X(n-1)*En*sqrt(Delta_t)
where u is the drift: u = 0.2
Delta_t = 1/250 year
Volatility: Sigma = 0.3
En = NORMSINV(Rand()) a standard normal random variable
I have trouble incorporating number of trajectories in to the VBA code.
The formula is as follows
X(n) = X(n-1) + u*X(n-1)*Delta_t + Sigma*X(n-1)*En*sqrt(Delta_t)
where u is the drift: u = 0.2
Delta_t = 1/250 year
Volatility: Sigma = 0.3
En = NORMSINV(Rand()) a standard normal random variable
I have trouble incorporating number of trajectories in to the VBA code.