GetDescendants - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Finance

  

GetDescendants

  

get descendants of a tree node

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

GetDescendants(T, i, j)

Parameters

T

-

binomial or trinomial tree data structure

i

-

positive integer; time step

j

-

positive integer; node index

Description

• 

At each level the nodes of a recombining tree are indexed from 1 to n (the number of tree nodes at this level), where 1 denotes the lowermost node and n denotes the uppermost node of the tree. The GetDescendants command returns the list of indices of the descendants of node j at level i of the tree T. This command is related to the GetProbabilities command in-as-much as the descendants returned by GetDescendants and transition probabilities returned by GetProbabilities are ordered correspondingly.

• 

Note that node descendants cannot be set. Instead you can adjust the state space and the transition probabilities to achieve the same approximating tree.

Examples

withFinance:

First consider a trinomial tree approximating an Ornstein-Uhlenbeck process.

XOrnsteinUhlenbeckProcess0.1,1.0,0.03,0.3

X_X0

(1)

TShortRateTreeX,4,10

Tmoduleend module

(2)

Here is a plot of this tree.

TreePlotT,thickness=2,gridlines=true

Get descendants of the node 3 at level 3. The descendants belong to level 4.

GetDescendantsT,3,3

3,4,5

(3)

Get the corresponding probabilities.

GetProbabilitiesT,3,3

0.1507749899,0.6655866667,0.1836383434

(4)

This means that the probability of moving from node (3, 3) to node (4, 2) is approximately 0.15, the probability of moving from node (3, 3) to node (4, 3) is approximately 0.66 and the probability of moving from node (3, 3) to node (4, 4) is approximately 0.18.

Compatibility

• 

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

• 

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

See Also

Finance[BinomialTree]

Finance[GetProbabilities]

Finance[GetUnderlying]

Finance[SetProbabilities]

Finance[SetUnderlying]

Finance[TrinomialTree]