Tree information
treeviewer(
displays a tree of instrument prices.PriceTree
,InstSet
)
If you provide the name of an instrument set (InstSet
) and you have named the instruments using the fieldName
,treeviewer
display identifies the instrument being displayed with its name. (SeeExample 3for a description.) If you do not provide the optionalInstSet
input argument, the instruments are identified by their sequence number in the instrument set. (SeeExample 6for a description.)
treeviewer(
displays a cash flow tree that has been created withCFTree
,InstSet
)swapbybdt
orswapbyhjm
. If you provide the name of an instrument set (InstSet
) containing cash flow names, thetreeviewer
display identifies the instrument being displayed with its name. (SeeExample 3for a description.) If the optionalInstSet
argument is not present, the instruments are identified by their sequence number in the instrument set. SeeExample 6for a description.)
loadderiv.mattreeviewer(HJMTree)
Thetreeviewer
功能显示the structure of an HJM tree in the left pane. The tree visualization in the right pane is blank.
To visualize the actual interest-rate tree, go to theTree Visualizationpane and clickPath(the default) andDiagram. Now, select the first path by clicking the last node (t = 3
) of the upper branch.
The entire upper path is highlighted in red.
To complete the process, select a second path by clicking the last node (t = 3
) of another branch. The second path is highlighted in purple. The final display looks like this.
TheTree Visualizationpane allows you to select alternative ways to display tree data. For example, if you selectPathandTableas your visualization choices, the final display above instead appears in tabular form.
To see a plot of interest rates along the chosen branches, clickPathandPlotin theTree Visualizationpane.
WithPlotselected, rising interest rates are shown on the upper branch and declining interest rates on the lower.
Finally, if you clickedNode and ChildrenunderTree Visualization, you restrict the data displayed to just the selected parent node and its children.
WithNode and Childrenselected, the choices underVisualizationare unavailable.
load deriv.mat treeviewer(BDTTree)
Thetreeviewer
功能显示the structure of a BDT tree in the left pane. The tree visualization in the right pane is blank.
To visualize the actual interest-rate tree, go to theTree Visualizationpane and clickPath(the default) andDiagram. Now, select the first path by clicking the first node of the up branch (t = 1
). Continue by clicking the down branch at the next node (t = 2
). The two figures below show the treeviewer path diagrams for these selections.
Continue clicking all nodes in succession until you reach the end of the branch. The entire path you have selected is highlighted in red.
Select a second path by clicking the first node of the lower branch (t = 1
). Continue clicking lower nodes as you did on the first branch. The second branch is highlighted in purple. The final display looks like this.
loadderiv.mat[Price, PriceTree] = hjmprice(HJMTree, HJMInstSet); treeviewer(PriceTree, HJMInstSet)
loadderiv.mat[Price, PriceTree] = bdtprice(BDTTree, BDTInstSet); treeviewer(PriceTree, BDTInstSet)
loadderiv.mat[Price, PriceTree] = hjmprice(HJMTree, HJMInstSet); Names = {'Bond1','Bond2','Option','Fixed','Float','Cap',...'Floor','Swap'}; treeviewer(PriceTree, Names)
loadderiv.mat[Price, PriceTree] = hjmprice(HJMTree, HJMInstSet); treeviewer(PriceTree)
bdttree
|bktree
|cirtree
|eqptree
|hjmtree
|hwtree
|instadd
|itttree
|lrtree
|mmktbybdt
|mmktbyhjm
|stttree
|swapbybdt
|swapbyhjm