| Contents | Index |
[NumLevels, NumPos, NumStates] = trintreeshape(TrinTree)
TrinTree | Recombining price or interest-rate trinomial tree. |
[NumLevels, NumPos, NumStates] = trintreeshape(TrinTree) returns information on a recombining trinomial tree's shape.
NumLevels is the number of time levels of the tree.
NumPos is a 1-by-NUMLEVELS vector containing the length of the state vectors in each level.
NumStates is a 1-by-NUMLEVELS vector containing the number of state vectors in each level.
Create a Hull-White tree by loading the example file.
load deriv.mat;
With treeviewer you can see the general shape of the HW interest-rate tree.
treeviewer(HWTree)

With this tree
[NumLevels, NumPos, NumStates] = trintreeshape(HWTree)
returns
NumLevels =
4
NumPos =
1 1 1 1
NumStates =
1 3 5 5
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |