Finance - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Finance

  

ItoProcess

  

create new Ito process

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

ItoProcess(x0, mu, sigma)

ItoProcess(x0, mu, sigma, x, t)

ItoProcess(X, Sigma)

Parameters

x0

-

the initial value

mu

-

the drift parameter

sigma

-

volatility parameter

X

-

Vector of one-dimensional Ito processes

Sigma

-

matrix

Description

• 

The ItoProcess command creates a new one- or multi-dimensional Ito process, which is a stochastic process Xt governed by the stochastic differential equation (SDE)

dXt=μXt,tdt+σXt,tdWt

where

– 

μXt,t is the drift parameter

– 

σXt,t is the diffusion parameter

and

– 

Wt is the standard Wiener process.

• 

The parameter x0 defines the initial value of the underlying stochastic process. It must be a real constant.

• 

The parameter mu is the drift. In the simplest case of a constant drift mu is real number (that is, any expression of type realcons). Time-dependent drift can be given either as an algebraic expression or as a Maple procedure. If mu is given as an algebraic expression, then the parameter t must be passed to specify which variable in mu should be used as a time variable. A Maple procedure defining a time-dependent drift must accept one parameter (the time) and return the corresponding value for the drift.

• 

The parameter sigma is the diffusion. Similar to the drift parameter, the volatility can be constant or time-dependent.

• 

One can use the ItoProcess command to construct a multi-dimensional Ito process with the given correlation structure. To be more precise, assume that X is an n-dimensional vector whose components X1, ..., Xn are one-dimensional Ito processes. Let μ1,...,μn, and σ1,...,σn be the corresponding drift and diffusion terms. The ItoProcess(X, Sigma) command will create an n-dimensional Ito process Y such that

dYti=μiYti,t+σiYti,tdWti

where Wt is an n-dimensional Wiener process whose covariance matrix is Sigma. Note that the matrix Sigma must have numeric coefficients.

Examples

with(Finance):

Y := ItoProcess(1.0, mu, sigma, x, t);

Y_X0

(1)

Drift(Y(t));

μ

(2)

Diffusion(Y(t));

σ

(3)

Drift(exp(Y(t)));

μⅇ_X0t+σ2ⅇ_X0t2

(4)

Diffusion(exp(Y(t)));

σⅇ_X0t

(5)

You can generate sample paths for this stochastic process (in order to do this, we must assign numeric values to mu and sigma).

mu := 0.1;

μ0.1

(6)

sigma := 0.5;

σ0.5

(7)

PathPlot(exp(Y(t)), t = 0..3, timesteps = 100, replications = 10);

Here is an example of a multi-dimensional Ito process.

mu := 'mu';

μμ

(8)

sigma := 'sigma';

σσ

(9)

X0 := <100.0, 0.0>;

X0100.00.

(10)

Mu := <mu*X[1], kappa*(theta-X[2])>;

ΜμX1κθX2

(11)

Sigma := <<sqrt(X[2])*X[1]|0.0>,<0.0|sigma*X[2]>>;

ΣX2X10.0.σX2

(12)

S := ItoProcess(X0, Mu, Sigma, X, t);

S_X2

(13)

Drift(S(t));

μ_X2t1κθ_X2t2

(14)

Diffusion(S(t));

_X2t2_X2t100σ_X2t2

(15)

mu := 0.1;

μ0.1

(16)

sigma := 0.5;

σ0.5

(17)

kappa := 1.0;

κ1.0

(18)

theta := 0.4;

θ0.4

(19)

A := SamplePath(S(t), t = 0..1, timesteps = 100, replications = 10);

(20)

PathPlot(A, 1, thickness = 3, markers = false, color = red..blue, axes = BOXED, gridlines = true);

PathPlot(A, 2, thickness = 3, markers = false, color = red..blue, axes = BOXED, gridlines = true);

ExpectedValue(max(S(1)[1]-100, 0), timesteps = 100, replications = 10^4);

value=21.41114565&comma;standarderror=0.3390630872

(21)

In this example, construct a two-dimensional Ito process using two one-dimensional projections and a given covariance matrix.

X := GeometricBrownianMotion(100.0, 0.05, 0.3, t);

X_X4

(22)

Y := GeometricBrownianMotion(100.0, 0.07, 0.2, t);

Y_X5

(23)

Sigma := <<1|0.5>,<0.5|1>>;

Σ10.50.51

(24)

Z := ItoProcess(<X, Y>, Sigma);

Z_X6

(25)

Drift(Z(t));

0.05_X6t10.07_X6t2

(26)

Diffusion(Z(t));

0.3_X6t10.15_X6t10.10_X6t20.2_X6t2

(27)

ExpectedValue(max(X(1)-Y(1), 0), timesteps = 100, replications = 10^4);

value=14.32896059&comma;standarderror=0.2447103632

(28)

ExpectedValue(max(Z(1)[1]-Z(1)[2], 0), timesteps = 100, replications = 10^4);

value=8.103315185&comma;standarderror=0.1520913055

(29)

References

  

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[ItoProcess] command was introduced in Maple 15.

• 

For more information on Maple 15 changes, see Updates in Maple 15.

See Also

Finance[BlackScholesProcess]

Finance[CEVProcess]

Finance[Diffusion]

Finance[Drift]

Finance[ExpectedValue]

Finance[GeometricBrownianMotion]

Finance[ItoProcess]

Finance[PathPlot]

Finance[SamplePath]

Finance[SampleValues]

Finance[StochasticProcesses]

Finance[WienerProcess]