Finance
TimeGrid
return an object for time discretization
Calling Sequence
Parameters
Description
Examples
Compatibility
TimeGrid(endtime, timesteps)
TimeGrid(timeinterval, timesteps)
TimeGrid(gridpoints)
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
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, T⁡i 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, T⁡i 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.
with⁡Finance:
T1≔TimeGrid⁡1.0,10:
n1≔T1timesteps
n1≔10
seq⁡T1⁡i,i=0..n1
0.,0.1000000000,0.2000000000,0.3000000000,0.4000000000,0.5000000000,0.6000000000,0.7000000000,0.8000000000,0.9000000000,1.000000000
T2≔TimeGrid⁡0.5..1.0,10:
n2≔T2timesteps
n2≔11
seq⁡T2⁡i,i=0..n2
0.,0.5,0.5500000000,0.6000000000,0.6500000000,0.7000000000,0.7500000000,0.8000000000,0.8500000000,0.9000000000,0.9500000000,1.000000000
T3≔TimeGrid⁡1,1.1,1.3,1.6,2.0,3:
n3≔T3timesteps
n3≔6
seq⁡T3⁡i,i=0..n3
0.,1,1.1,1.3,1.6,2.0,3
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