Finance - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Date Arithmetic : Finance/TimeGrid

Finance

  

TimeGrid

  

return an object for time discretization

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

TimeGrid(endtime, timesteps)

TimeGrid(timeinterval, timesteps)

TimeGrid(gridpoints)

Parameters

timeinterval

-

range; length time interval in years

timesteps

-

positive integer; number of steps in the time interval

endtime

-

positive; end of the time interval

gridpoints

-

list or Vector; points in the time grid

Description

• 

The TimeGrid command generates discretizing grids for the time space with the given parameters; the command returns a module representing the constructed time grid. This module can be passed to other commands of the Finance package that expect a time grid as one of the parameters; it can also be used as if it were a procedure. Assume for example that the module returned by TimeGrid was assigned to the name T. Then for any positive integer i, Ti will return the ith member of the corresponding time grid or issue an error if i exceeds the size of the time grid. For negative i, Ti returns the ith from the right element of the time grid. The number of time steps in the created time grid can be accessed using the timesteps export.

• 

The calling sequence TimeGrid(endtime, timesteps) creates a uniform time grid on the interval 0..endtime using the specified number of timesteps.

• 

The calling sequence TimeGrid(timesteps, timesteps) creates a uniform time grid on the interval 0..endtime using the specified number of timesteps. The parameter timeinterval must be a range of type t0..t1, where t0 and t1 are non-negative real constants such that t0<t1.

• 

Finally, the calling sequence TimeGrid(gridpoints) can be used to create non-uniform time grids with the specified points. The parameter gridpoints can be either a list or a Vector. The elements of gridpoints must be sorted in ascending order.

• 

Note that all time grids must contain the point 0, which will be added if necessary.

Examples

withFinance&colon;

T1TimeGrid1.0&comma;10&colon;

n1T1timesteps

n1:=10

(1)

seqT1i&comma;i&equals;0..n1

0.&comma;0.1000000000&comma;0.2000000000&comma;0.3000000000&comma;0.4000000000&comma;0.5000000000&comma;0.6000000000&comma;0.7000000000&comma;0.8000000000&comma;0.9000000000&comma;1.000000000

(2)

T2TimeGrid0.5..1.0&comma;10&colon;

n2T2timesteps

n2:=11

(3)

seqT2i&comma;i&equals;0..n2

0.&comma;0.5&comma;0.5500000000&comma;0.6000000000&comma;0.6500000000&comma;0.7000000000&comma;0.7500000000&comma;0.8000000000&comma;0.8500000000&comma;0.9000000000&comma;0.9500000000&comma;1.000000000

(4)

T3TimeGrid1&comma;1.1&comma;1.3&comma;1.6&comma;2.0&comma;3&colon;

n3T3timesteps

n3:=6

(5)

seqT3i&comma;i&equals;0..n3

0.&comma;1&comma;1.1&comma;1.3&comma;1.6&comma;2.0&comma;3

(6)

Compatibility

• 

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

• 

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

See Also

Finance[PathGenerator]

Finance[SamplePath]

Finance[SampleValues]

Finance[Schedule]

 


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