Financial Derivatives Toolbox    
treeshape

Retrieve shape of a recombining tree

Syntax

Arguments

Tree
Recombining tree.

Description

[NumLevels, NumPos, IsPriceTree] = treeshape(Tree) returns information on a recombining 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.

IsPriceTree is a Boolean determining if a final horizontal branch is present in the tree.

Examples

Create a BDT tree by loading the example file.

With treeviewer you can see the general shape of the BDT interest rate tree.

With this tree

returns

See Also

mktree, treepath


  treepath treeviewer