Finance - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Stochastic Processes : Finance/SquareRootDiffusion

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&plus;dt given Xt.

Examples

withFinance&colon;

rSquareRootDiffusionu&comma;&kappa;&comma;&theta;&comma;&sigma;&comma;t

r:=_X

(1)

Driftrt

&kappa;&theta;_Xt

(2)

Diffusionrt

&sigma;_Xt

(3)

Drift&ExponentialE;rt

&kappa;&theta;_Xt&ExponentialE;_Xt&plus;12&sigma;2_Xt&ExponentialE;_Xt

(4)

Diffusion&ExponentialE;rt

&sigma;_Xt&ExponentialE;_Xt

(5)

u0.2

u:=0.2

(6)

&kappa;1.0

&kappa;:=1.0

(7)

&theta;0.1

&theta;:=0.1

(8)

&sigma;0.3

&sigma;:=0.3

(9)

rSquareRootDiffusionu&comma;&kappa;&comma;&theta;&comma;&sigma;

r:=_X0

(10)

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

Compare the Euler discretization and the unbiased discretization.

&sigma;0.0001

&sigma;:=0.0001

(11)

r1SquareRootDiffusionu&comma;&kappa;&comma;&theta;&comma;&sigma;

r1:=_X1

(12)

r2SquareRootDiffusionu&comma;&kappa;&comma;&theta;&comma;&sigma;&comma;t&comma;scheme&equals;unbiased

r2:=_X2

(13)

r3dsolve&DifferentialD;&DifferentialD;txt&equals;&kappa;&theta;xt&comma;x0&equals;u

r3:=xt&equals;110&plus;110&ExponentialE;t

(14)

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

P1:=

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

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

plots&lsqb;display&rsqb;P1&comma;P2&comma;P3&comma;thickness&equals;3&comma;axes&equals;BOXED&comma;gridlines&equals;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]

 

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam