create new Brownian motion process
GeometricBrownianMotion(x0, mu, sigma, opts)
GeometricBrownianMotion(x0, mu, sigma, t, opts)
real constant; initial value
algebraic expression, operator or procedure; drift parameter
algebraic expression, operator, procedure or a one-dimensional stochastic process; volatility parameter
name; time parameter
(optional) equation(s) of the form option = value where option is scheme; specify options for the GeometricBrownianMotion command
scheme = unbiased or Euler -- This option specifies which discretization scheme should be used for simulating this process.
The GeometricBrownianMotion command creates a new 1-dimensional geometric Brownian motion process. This is a stochastic process S⁡t, which is governed by the stochastic differential equation (SDE)
μ=μ⁡t is the drift parameter
σ=σ⁡t is the volatility parameter
W⁡t is the standard Wiener process.
The parameter x0 defines the initial value of the underlying stochastic process. It must be a real constant.
The parameter mu is the drift. In the simplest case of a constant drift mu is a real number (that is, any expression of type realcons). Time-dependent drift can be given either as an algebraic expression or as a Maple procedure. If mu is given as an algebraic expression, then the parameter t must be passed to specify which variable in mu should be used as a time variable. A Maple procedure defining a time-dependent drift must accept one parameter (the time) and return the corresponding value for the drift.
The parameter sigma is the volatility. Similar to the drift parameter, the volatility can be constant or time-dependent. Unlike drift, volatility can involve other (one-dimensional) stochastic variables.
The scheme option specifies the discretization scheme used for simulation of this process. By default the standard Euler scheme is used. When scheme is set to unbiased the transition density will be used to simulate a value S⁡t+dt given S⁡t. This scheme is appropriate in the case of a time-dependent drift and/or volatility.
T ≔ 2.0
First consider the case of a one-dimensional Brownian motion with constant drift and volatility.
X ≔ GeometricBrownianMotion⁡1.0,0.02,0.3:
Compute the drift and diffusion for functions of X.
W ≔ GeometricBrownianMotion⁡1,μ⁡t,σ⁡t,t:
Here is an example of a one-dimensional Brownian motion with time-dependent parameters given in algebraic form.
μ ≔ piecewise⁡t<1,0.02,0.02t
σ ≔ evalf3⁡CurveFitting:-Spline⁡0,0.5,1,0.3,1.5,1.5,2,1.0,t,degree=3
Y ≔ GeometricBrownianMotion⁡1.0,μ,σ,t:
S ≔ SamplePath⁡Y⁡t,t=0..T,replications=106:
Here is the same example but with drift and volatility given in the form of Maple procedures.
μ ≔ unapply⁡μ,t
σ ≔ unapply⁡σ,t
Z ≔ GeometricBrownianMotion⁡1.0,μ,σ:
S ≔ SamplePath⁡Z⁡t,t=0..T,replications=106:
You can simulate values for any path function given as a Maple procedure.
X ≔ GeometricBrownianMotion⁡1.0,0.05,0.3:
V ≔ SampleValues⁡A→rtable_scanblock⁡A,rtable_dims⁡A,':-Maximum',X,0..T,timesteps=100,replications=105:
Here are examples involving stochastic volatility.
R ≔ OrnsteinUhlenbeckProcess⁡0.5,1.0,0.5,0.3:
Y ≔ GeometricBrownianMotion⁡1.0,0.0,R⁡t2,t:
Here is the same using different discretization schemes. For presentation purposes consider a geometric Brownian motion with very low volatility and time-dependent drift. Compare the simulated results with the corresponding solution of an ordinary (non-stochastic) differential equation.
f ≔ sin⁡t
W1 ≔ GeometricBrownianMotion⁡1.0,f,0.001,t:
W2 ≔ GeometricBrownianMotion⁡1.0,f,0.001,t,scheme=unbiased:
W3 ≔ eval⁡y⁡t,dsolve⁡ⅆⅆt⁢y⁡ty⁡t=sin⁡t,y⁡0=1.0
Glasserman, P., Monte Carlo Methods in Financial Engineering. New York: Springer-Verlag, 2004.
Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.
The Finance[GeometricBrownianMotion] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
Download Help Document
What kind of issue would you like to report? (Optional)