Main Content


Extract entries from node of bushy tree



Values = bushpath(Tree,BranchList) extracts entries of a node of a bushy tree. The node path is described by the sequence of branchings taken, starting at the root. The top branch is number 1, the second-to-top is 2, and so on. Set the branch sequence to zero to obtain the entries at the root node.


collapse all

Create an HJM tree by loading the example file.

load deriv.mat; 

Use bushpath to return the rates at the tree nodes located by taking the up branch, then the down branch, and finally the up branch again.

FwdRates = bushpath(HJMTree.FwdTree, [1 2 1]) 
FwdRates = 4×1


You can visualize this with the treeviewer function.


Input Arguments

collapse all

Bushy tree, specified using an HJM, BDT, HW, BK, or CIR tree.

Data Types: struct

Sequence of branching, specified as a number of paths (NUMPATHS) by path length (PATHLENGTH) matrix.

Data Types: double

Output Arguments

collapse all

Retrieved entries of a bushy tree, returned as a number of values (NUMVALS)-by-NUMPATHS matrix.

Version History

Introduced before R2006a