Finance[TimeGrid] - return an object for time discretization
|
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, 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, 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 using the specified number of timesteps.
|
•
|
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 , which will be added if necessary.
|
|
|
Compatibility
|
|
•
|
The Finance[TimeGrid] command was introduced in Maple 15.
|
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
>
|
|
| (5) |
>
|
|
| (6) |
|
|
Download Help Document
Was this information helpful?