Financial Derivatives Toolbox    
bushshape

Retrieve shape of bushy tree

Syntax

Arguments

Tree
Bushy tree.

Description

[NumLevels, NumChild, NumPos, NumStates, Trim] = bushshape(Tree) returns information on a bushy tree's shape.

NumLevels is the number of time levels of the tree.

NumChild is a 1 by number of levels (NUMLEVELS) vector with the number of branches (children) of the nodes in each level.

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.

Trim is 1 if NumPos decreases by one when moving from one time level to the next. Otherwise, it is 0.

Example

Create an HJM tree by loading the example file.

Then

returns:

Recreate the tree using the mkbush function:

See Also

bushpath, mkbush


 bushpath capbyhjm