Shape of recombining trinomial tree
Determine Shape of Recombining Trinomial Tree
This example shows how to obtain information on a recombining trinomial tree's shape.
HW tree by loading the example file.
treeviewer you can see the general shape of the
HW interest-rate tree.
trintreeshape to display the shape of the binomial tree.
[NumLevels, NumPos, IsPriceTree] = trintreeshape(HWTree)
NumLevels = 4
NumPos = 1×4 1 1 1 1
IsPriceTree = 1×4 1 3 5 5
NumLevels — Number of time levels of tree
Number of time levels of tree, returned as a numeric.
NumPos — Length of the state vectors in each level
Length of the state vectors in each level, returned as a
NumStates — Number of state vectors in each level
Number of state vectors in each level, returned as a