Geometric Brownian Motion with Nonuniform Time Grid

​
seed
1
h coefficient
h
1
time steps
n
50
GBM paths
m
100
time to expiry (years)
T
3
starting asset price
S
0
40
strike price
X
45
risk-free rate
r
0.07
dividend yield
δ
0.
volatility
σ
0.3
This Demonstration simulates geometric Brownian motion (GBM) paths with a nonuniform time grid. A GBM is a continuous-time stochastic process in which the logarithm of the randomly varying quantity follows a Brownian motion (also called a Wiener process) with drift. In computational finance, GBM is used to model stock prices in the Black–Scholes model and is the most widely used model of stock price behavior.
As an example, this Demonstration generates random GBM paths and uses Monte Carlo simulation to estimate the price of a European put option, with starting stock price
S
0
, strike price
X
, maturity time
T
, stock price volatility
σ
, risk-free interest rate
r
, and stock dividend yield
δ
. The simulation output is compared against the analytic Black–Scholes output, calculated with Mathematica's built-in function FinancialDerivative.
The
h
coefficient (
0<h≤1
) generates nonuniform time steps with decreasing length as we approach maturity, according to the model:
dt
i
=h·
dt
i-1
. If
h=1
, the time grid becomes uniform.

Details

Let
n
denote the number of time steps and
m
the number of GBM paths. The list of the
n+1
stock prices that the
th
k
GBM path consists of are generated according to the following process:
S
k,i
=
S
k,i-1
expμ
dt
i-1
+σ
dt
i-1
·Z
,
i=2,3,…,n+1
, where
S
k,1
=
S
0
,
Z
follows the standard normal distribution, and
μ=r-δ-
2
σ
2
is the drift of the stochastic process.
The Monte Carlo estimation of the European put option derives from the discounted average of the option's possible payoffs at expiry:
-r·T
e
m
m
∑
j=1
maxX-
S
j,n+1
,0
.
This Demonstration does not use Mathematica's built-in function GeometricBrownianMotionProcess because the Monte Carlo simulation using RandomFunction requires fixed time steps
dt
as in RandomFunction[GeometricBrownianMotionProcess[mu,sigma,x0],{t0,tend,dt}].

External Links

Black–Scholes Theory (Wolfram MathWorld)
Simulating the Simple Random Walk
Self-Similarity in Random Walk
Tilley's Bundling Algorithm
Hold-or-Exercise for an American Put Option

Permanent Citation

Michail Bozoudis, Michail Boutsikas
​
​"Geometric Brownian Motion with Nonuniform Time Grid"​
​http://demonstrations.wolfram.com/GeometricBrownianMotionWithNonuniformTimeGrid/​
​Wolfram Demonstrations Project​
​Published: June 20, 2016