| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Derivatives Toolbox |
| Contents | Index |
| Learn more about Financial Derivatives Toolbox |
RateTree = cvtree(Tree)
Tree | Heath-Jarrow-Morton, Black-Derman-Toy, Hull-White, or Black-Karasinski tree structure using inverse-discount notation for forward rates. |
RateTree = cvtree(Tree) converts a tree structure using inverse-discount notation to a tree structure using rate notation for forward rates.
Convert a Hull-White tree using inverse-discount notation to a Hull-White tree displaying interest-rate notation.
load deriv.mat;
HWTree
HWTree =
FinObj: 'HWFwdTree'
VolSpec: [1x1 struct]
TimeSpec: [1x1 struct]
RateSpec: [1x1 struct]
tObs: [0 1 2 3]
dObs: [731947 732313 732678 733043]
CFlowT: {[4x1 double] [3x1 double] [2x1 double] [4]}
Probs: {[3x1 double] [3x3 double] [3x5 double]}
Connect: {[2] [2 3 4] [2 2 3 4 4]}
FwdTree: {1x4 cell}
HWTree.FwdTree{1}
ans =
1.0279
HWTree.FwdTree{2}
ans =
1.0528 1.0356 1.0186
Use treeviewer to display the path of interest rates expressed in inverse-discount notation.
treeviewer(HWTree)

Use cvtree to convert the inverse-discount notation to interest-rate notation.
RTree = cvtree(HWTree)
RTree =
FinObj: 'HWRateTree'
VolSpec: [1x1 struct]
TimeSpec: [1x1 struct]
RateSpec: [1x1 struct]
tObs: [0 1 2 3]
dObs: [731947 732313 732678 733043]
CFlowT: {[4x1 double] [3x1 double] [2x1 double] [4]}
Probs: {[3x1 double] [3x3 double] [3x5 double]}
Connect: {[2] [2 3 4] [2 2 3 4 4]}
RateTree: {1x4 cell}
RTree.RateTree{1}
ans =
0.0275
RTree.RateTree{2}
ans =
0.0514 0.0349 0.0185
Now use treeviewer to display the converted tree, showing the path of interest rates expressed as forward rates.

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-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |