| Contents | Index |
Values = trintreepath(TrinTree, BranchList)
TrinTree | Recombining price or interest-rate trinomial tree. |
Number of paths (NUMPATHS) by path length (PATHLENGTH) matrix containing the sequence of branchings. |
Values = trintreepath(TrinTree, BranchList) extracts entries of a node of a recombining trinomial tree. The node path is described by the sequence of branchings taken, starting at the root. The top branch is number 1, the middle branch is 2, and the bottom branch is 3. Set the branch sequence to 0 to obtain the entries at the root node.
Values is a number of values (NUMVALS)-by-NUMPATHS matrix containing the retrieved entries of a recombining tree.
Create a Hull-White tree by loading the example file.
load deriv.mat;
Then, for example
FwdRates = trintreepath(HWTree, [1 2 3])
returns the rates at the tree nodes located by starting at 0, taking the up branch at the first node, the middle branch at the second node, and finally the bottom branch at the third node.
FwdRates =
1.0279
1.0528
1.0652
1.0591
You can visualize this with the treeviewer function.
treeviewer(HWTree)

View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |