Financial Derivatives Toolbox | ![]() ![]() |
Extract entries from node of bushy tree
Syntax
Values = bushpath(Tree, BranchList)
Arguments
Tree |
Bushy tree. |
BranchList |
Number of paths (NUMPATHS ) by path length (PATHLENGTH ) matrix containing the sequence of branchings. |
Description
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 one, the second-to-top is two, 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.
Example
Create an HJM tree by loading the example file.
load deriv.mat;
FwdRates = bushpath(HJMTree.FwdTree, [1 2 1])
returns the rates at the tree node located by taking the first branch, then the second branch, and finally the first branch again.
FwdRates = 1.0200 0.9276 1.0405 0.9648
See Also
![]() | bondbyzero | bushshape | ![]() |