Finance - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Finance

  

OrnsteinUhlenbeckProcess

  

create new Ornstein-Uhlenbeck process

 

Calling Sequence

Parameters

Options

Description

Examples

References

Compatibility

Calling Sequence

OrnsteinUhlenbeckProcess(x0, mu, theta, sigma, opts)

Parameters

x0

-

algebraic expression; initial value

mu

-

algebraic expression; long-running mean

theta

-

algebraic expression; the speed of mean reversion

sigma

-

algebraic expression; the volatility parameter

opts

-

(optional) equation(s) of the form option = value where option is scheme; specify options for the OrnsteinUhlenbeckProcess command

Options

• 

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

Description

• 

The OrnsteinUhlenbeckProcess command creates an Ornstein-Uhlenbeck process. This is a stochastic process Xt governed by the stochastic differential equation (SDE)

dXt=θμXtdt+σdWt

where theta, sigma, and mu are real constants.

• 

The parameter x0 defines the initial value of the underlying stochastic process.

• 

The parameter theta is the speed of mean-reversion. The parameter mu is the long-running mean. The parameter sigma is the volatility. In general, theta, mu, 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:

rOrnsteinUhlenbeckProcessr0,μ,θ,σ

r:=_X

(1)

Driftrt

θμ_Xt

(2)

Diffusionrt

σ

(3)

r00.5

r0:=0.5

(4)

θ1.0

θ:=1.0

(5)

μ0.25

μ:=0.25

(6)

σ0.3

σ:=0.3

(7)

PathPlotrt,t=0..3,timesteps=100,replications=10,thickness=3,color=red..blue,axes=BOXED

Here is an example using the transition density.

μ0.02

μ:=0.02

(8)

θ1.0

θ:=1.0

(9)

σ0.001

σ:=0.001

(10)

r00.05

r0:=0.05

(11)

rOrnsteinUhlenbeckProcessr0,μ,θ,σ

r:=_X0

(12)

qOrnsteinUhlenbeckProcessr0,μ,θ,σ,scheme=unbiased

q:=_X1

(13)

pdsolveⅆⅆtxt=θμxt,x0=r0

p:=xt=150+3100ⅇt

(14)

P1PathPlotrt,t=0..5,timesteps=5,replications=1,color=red:

P2PathPlotqt,t=0..5,timesteps=5,replications=1,color=blue:

P3plotrhsp,t=0..5,color=green:

plots[display]P1,P2,P3,thickness=3,axes=BOXED

Here is a realization of the Ornstein-Uhlenbeck process as a subordinated Wiener process.

μ0.02

μ:=0.02

(15)

θ1.0

θ:=1.0

(16)

σ0.01

σ:=0.01

(17)

r00.05

r0:=0.05

(18)

rOrnsteinUhlenbeckProcessr0,μ,θ,σ

r:=_X2

(19)

τⅇ2θt12θ

τ:=0.5000000000ⅇ2.0t0.5000000000

(20)

WWienerProcessτ

W:=_W

(21)

qt→r0ⅇθt+μ1ⅇθt+σⅇθtWt

q:=t→r0ⅇθt+μ1ⅇθt+σⅇθtWt

(22)

RPathPlotrt,t=0..3,timesteps=100,replications=3,thickness=3,color=red:

QPathPlotqt,t=0..3,timesteps=100,replications=3,thickness=3,color=blue:

plots[display]R,Q

ExpectedValue∫01ruⅆu,replications=104,timesteps=100

value=0.03902469384,standarderror=0.00004066146237

(23)

ExpectedValue∫01quⅆu,replications=104,timesteps=100

value=0.03898350713,standarderror=0.0001753525705

(24)

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.

  

Vasicek, O.A., An Equilibrium Characterization of the Term Structure, Journal of Financial Economics, 5 (1977), pp 177-188.

Compatibility

• 

The Finance[OrnsteinUhlenbeckProcess] 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[HullWhiteProcess]

Finance[ItoProcess]

Finance[SamplePath]

Finance[SampleValues]

Finance[SquareRootDiffusion]

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