get the size of a binomial/trinomial tree at the given level - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Lattice Methods : Finance/GetSize

Finance[GetSize] - get the size of a binomial/trinomial tree at the given level

Calling Sequence

GetSize(T, i)

Parameters

T

-

binomial or trinomial tree data structure

i

-

positive integer; level

Description

• 

The GetSize command returns the number of nodes at level i of the tree T. See GetDescendants for more details about node indexing.

Examples

withFinance:

M:=VasicekModel0.05,0.03,0.5,0.03

M:=moduleend module

(1)

T:=ShortRateTreeM,3,20

T:=moduleend module

(2)

TreePlotT,thickness=2,axes=BOXED,gridlines=true

GetSizeT,1

1

(3)

GetSizeT,2

3

(4)

GetSizeT,3

5

(5)

GetSizeT,10

15

(6)

GetSizeT,11

15

(7)

See Also

Finance[BinomialTree], Finance[GetDescendants], Finance[GetProbabilities], Finance[SetProbabilities], Finance[TrinomialTree]


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