SquareRootDiffusion - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Finance

  

SquareRootDiffusion

  

create new square-root diffusion process

 

Calling Sequence

Parameters

Options

Description

Examples

References

Compatibility

Calling Sequence

SquareRootDiffusion(X0, kappa, theta, sigma, opts)

Parameters

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

Options

• 

scheme = unbiased or Euler -- This option specifies which discretization scheme should be used for simulating this process.

Description

• 

The SquareRootDiffusion command creates a new square-root diffusion process. This is a process Xt governed by the stochastic differential equation (SDE)

dXt=κθtXtdt+σXtdWt

where κ and σ are positive constants and θt is a deterministic function of time such that 0<θt for all 0t.

• 

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 Xt+dt given Xt.

Examples

withFinance&colon;

rSquareRootDiffusionu&comma;κ&comma;θ&comma;σ&comma;t

r_X0

(1)

Driftrt

κθ_X0t

(2)

Diffusionrt

σ_X0t

(3)

Driftexprt

κθ_X0t&ExponentialE;_X0t+σ2_X0t&ExponentialE;_X0t2

(4)

Diffusionexprt

σ_X0t&ExponentialE;_X0t

(5)

u0.2

u0.2

(6)

κ1.0

κ1.0

(7)

θ0.1

θ0.1

(8)

σ0.3

σ0.3

(9)

rSquareRootDiffusionu&comma;κ&comma;θ&comma;σ

r_X1

(10)

PathPlotrt&comma;t=0..3&comma;timesteps=100&comma;replications=10&comma;axes=BOXED&comma;gridlines=true

Compare the Euler discretization and the unbiased discretization.

σ0.0001

σ0.0001

(11)

r1SquareRootDiffusionu&comma;κ&comma;θ&comma;σ

r1_X2

(12)

r2SquareRootDiffusionu&comma;κ&comma;θ&comma;σ&comma;t&comma;scheme=unbiased

r2_X3

(13)

r3dsolvediffxt&comma;t=κθxt&comma;x0=u

r3xt=110+&ExponentialE;t10

(14)

P1PathPlotr1t&comma;t=0..3&comma;timesteps=5&comma;color=red

P2PathPlotr2t&comma;t=0..3&comma;timesteps=5&comma;color=blue&colon;

P3plotrhsr3&comma;t=0..3&comma;color=green&colon;

plotsdisplayP1&comma;P2&comma;P3&comma;thickness=3&comma;axes=BOXED&comma;gridlines=true

References

  

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.

Compatibility

• 

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]