Finance
SquareRootDiffusion
create new square-root diffusion process
Calling Sequence
Parameters
Options
Description
Examples
References
Compatibility
SquareRootDiffusion(X0, kappa, theta, sigma, opts)
X0
-
algebraic expression; initial value
kappa
algebraic expression; speed of mean reversion
theta
algebraic expression; long-term running mean
sigma
algebraic expression; volatility
opts
(optional) equation(s) of the form option = value where option is scheme; specify options for the SquareRootDiffusion command
scheme = unbiased or Euler -- This option specifies which discretization scheme should be used for simulating this process.
The SquareRootDiffusion command creates a new square-root diffusion process. This is a process X⁡t governed by the stochastic differential equation (SDE)
dX⁡t=κ⁢θ⁡t−X⁡t⁢dt+σ⁢X⁡t⁢dW⁡t
where κ and σ are positive constants and θ⁡t is a deterministic function of time such that 0<θ⁡t for all 0≤t.
This process was proposed by Cox, Ingersoll, and Ross as a model of the short rate, which is often referred to as the CIR model.
The parameter X0 defined the initial value of the underlying stochastic process.
The parameter kappa is the speed of mean-reversion. The parameter theta is the long-term running mean. The parameter sigma is the volatility. In general, kappa, theta, and sigma can be any algebraic expressions. However, if the process is to be simulated, these parameters must be assigned numeric values.
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 X⁡t+dt given X⁡t.
with⁡Finance:
r≔SquareRootDiffusion⁡u,κ,θ,σ,t
r≔_X0
Drift⁡r⁡t
κ⁢θ−_X0⁡t
Diffusion⁡r⁡t
σ⁢_X0⁡t
Drift⁡exp⁡r⁡t
κ⁢θ−_X0⁡t⁢ⅇ_X0⁡t+σ2⁢_X0⁡t⁢ⅇ_X0⁡t2
Diffusion⁡exp⁡r⁡t
σ⁢_X0⁡t⁢ⅇ_X0⁡t
u≔0.2
κ≔1.0
θ≔0.1
σ≔0.3
r≔SquareRootDiffusion⁡u,κ,θ,σ
r≔_X1
PathPlot⁡r⁡t,t=0..3,timesteps=100,replications=10,axes=BOXED,gridlines=true
Compare the Euler discretization and the unbiased discretization.
σ≔0.0001
r1≔SquareRootDiffusion⁡u,κ,θ,σ
r1≔_X2
r2≔SquareRootDiffusion⁡u,κ,θ,σ,t,scheme=unbiased
r2≔_X3
r3≔dsolve⁡diff⁡x⁡t,t=κ⁢θ−x⁡t,x⁡0=u
r3≔x⁡t=110+ⅇ−t10
P1≔PathPlot⁡r1⁡t,t=0..3,timesteps=5,color=red
P2≔PathPlot⁡r2⁡t,t=0..3,timesteps=5,color=blue:
P3≔plot⁡rhs⁡r3,t=0..3,color=green:
plotsdisplay⁡P1,P2,P3,thickness=3,axes=BOXED,gridlines=true
Brigo, D., Mercurio, F., Interest Rate Models: Theory and Practice. New York: Springer-Verlag, 2001.
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[SquareRootDiffusion] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
See Also
Finance[BlackScholesProcess]
Finance[BrownianMotion]
Finance[Diffusion]
Finance[Drift]
Finance[ExpectedValue]
Finance[GeometricBrownianMotion]
Finance[HestonProcess]
Finance[ItoProcess]
Finance[OrnsteinUhlenbeckProcess]
Finance[SamplePath]
Finance[SampleValues]
Finance[StochasticProcesses]
Finance[WienerProcess]
Download Help Document