Finance - Maple Help

Online Help

All Products    Maple    MapleSim


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

Finance

  

PathGenerator

  

create new path generator for a stochastic process

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

PathGenerator(process, timegrid)

PathGenerator(process, timeinterval, timesteps)

Parameters

process

-

stochastic process; process for the path to be generated

timegrid

-

list, Vector, or time grid; time grid

timeinterval

-

range; length of simulation interval

timesteps

-

positive integer; number of time steps

Description

• 

The PathGenerator command creates a new path generator for the specified stochastic process. This command returns a module that can be used to simulate the underlying stochastic process as if it were a Maple procedure. Assume, for example, that the module returned by the PathGenerator command is assigned to the name T. Then for any positive integer n, Tn will return n replications of the sample path of the underlying process.

• 

In the one-dimensional case, the value returned by T is a matrix of size m×n, where m is the requested number of replications of the sample path (see the replications option) and n is the number of points in the time grid (the number of time steps plus one). Each row of this matrix is a single realization of the sample path of the stochastic process of interest. In the multi-dimensional case, the value returned by T is a matrix of size m×d×n, where m and n are the same as in the one-dimensional case, and d is the dimension of the stochastic process to be simulated, which is either given explicitly or deduced from the dimension of the underlying stochastic process.

• 

The module returned by the PathGenerator command can be passed to other commands such as Finance[SamplePath] or Finance[SampleValues] to simulate the underlying stochastic process.

• 

The PathGenerator(process, timegrid) calling sequence creates a path generator for process based on the specified time grid.

• 

The PathGenerator(process, timeinterval, timesteps) calling sequence constructs a path generator for process based on a uniform time grid on the interval timeinterval using the specified number of time steps. The parameter timeinterval must be of type range t0..t1, where t0 and t1 are non-negative real constants such that t0<t1. Note that if 0<t0, the value at t0 will be simulated using a single step of the default discretization method and hence can suffer from a significant discretization bias. Increasing the number of time steps will refine the grid between t0 and t1, but will have no effect on the value at t0. To reduce the bias, use a time interval of the form 0..t1.

Examples

withFinance&colon;

W1WienerProcess&colon;

P1PathGeneratorW1&comma;0..3&colon;

P15

0.0.8302445832568310.1.358228689897330.0.8668681761148390.0.8505251060551960.0.411930790747278

(1)

P2PathGeneratorW1&comma;0..3&comma;10

P2:=moduleoptionimplementation&equals;External/0x7f55097d8a48&semi;exportprocess&comma;timegrid&comma;ModuleApply&semi;end module

(2)

P25

1..5 x 1..11 ArrayData Type: float8Storage: rectangularOrder: C_order

(3)

Here is a path generator based on a non-homogeneous grid.

G0&comma;0.3&comma;0.5&comma;0.7&comma;1.0&comma;seq1.&plus;i10&comma;i&equals;1..10

G:= 1 .. 15 VectorcolumnData Type: anythingStorage: rectangularOrder: Fortran_order

(4)

P3PathGeneratorW1&comma;G

P3:=moduleoptionimplementation&equals;External/0x7f55099ea508&semi;exportprocess&comma;timegrid&comma;ModuleApply&semi;end module

(5)

PathPlotP320&comma;thickness&equals;2&comma;axes&equals;BOXED

This is simulating a multi-dimensional process.

W2WienerProcess1.0&comma;0.5&verbar;0.5&comma;1.0

W2:=_W0

(6)

P4PathGeneratorW2&comma;0..3&comma;3

P4:=moduleoptionimplementation&equals;External/0x7f5507240c40&semi;exportprocess&comma;timegrid&comma;ModuleApply&semi;end module

(7)

P45

1..5 x 1..2 x 1..4 ArrayData Type: float8Storage: rectangularOrder: C_order

(8)

This is creating a path generator for a Vector of one-dimensional processes.

W3PoissonProcess0.5&colon;

P5PathGeneratorW1&comma;W3&comma;0..3&comma;20

P5:=moduleoptionimplementation&equals;External/0x7f550723b428&semi;exportprocess&comma;timegrid&comma;ModuleApply&semi;end module

(9)

P51

1..1 x 1..2 x 1..21 ArrayData Type: float8Storage: rectangularOrder: C_order

(10)

Compatibility

• 

The Finance[PathGenerator] command was introduced in Maple 15.

• 

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

See Also

Finance[ExpectedShortfall]

Finance[ExpectedValue]

Finance[PathPlot]

Finance[SamplePath]

Finance[SampleValues]

Finance[TimeGrid]

Finance[ValueAtRisk]

 


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