| Financial Derivatives Toolbox™ | ![]() |
Values = bushpath(Tree, BranchList)
Tree | Bushy tree. |
Number of paths (NUMPATHS) by path length (PATHLENGTH) matrix containing the sequence of branchings. |
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.
Values is a number of values (NUMVALS)-by-NUMPATHS matrix containing the retrieved entries of a bushy tree.
Create an HJM tree by loading the example file.
load deriv.mat;
Then
FwdRates = bushpath(HJMTree.FwdTree, [1 2 1])
returns the rates at the tree nodes located by taking the up branch, then the down branch, and finally the up branch again.
FwdRates =
1.0356
1.0364
1.0526
1.0463
You can visualize this with the treeviewer function.
treeviewer(HJMTree)

![]() | bondbyzero | bushshape | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |