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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Stochastic Processes : 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_X0

(1)

Driftrt

θμ_X0t

(2)

Diffusionrt

σ

(3)

r00.5

r00.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

r00.05

(11)

rOrnsteinUhlenbeckProcessr0,μ,θ,σ

r_X1

(12)

qOrnsteinUhlenbeckProcessr0,μ,θ,σ,scheme=unbiased

q_X2

(13)

pdsolvediffxt,t=θμxt,x0=r0

pxt=150+3ⅇt100

(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:

plotsdisplayP1,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

r00.05

(18)

rOrnsteinUhlenbeckProcessr0,μ,θ,σ

r_X3

(19)

τexp2θt12θ

τ0.5000000000ⅇ2.0t0.5000000000

(20)

WWienerProcessτ

W_W

(21)

qtr0expθt+μ1expθt+σexpθtWt

qtr0ⅇθ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:

plotsdisplayR,Q

ExpectedValueIntru,u=0..1,replications=104,timesteps=100

value=0.03902469384,standarderror=0.00004066146237

(23)

ExpectedValueIntqu,u=0..1,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]