MATLAB 도움말 센터
Convert inverse-discount tree to interest-rate tree
RateTree = cvtree(Tree)
RateTree = cvtree(Tree) converts a tree structure using inverse-discount notation to a tree structure using rate notation for forward rates.
RateTree
Tree
example
collapse all
Convert a Hull-White tree using inverse-discount notation to a Hull-White tree displaying interest-rate notation.
load deriv.mat; HWTree
HWTree = struct with fields: FinObj: 'HWFwdTree' VolSpec: [1×1 struct] TimeSpec: [1×1 struct] RateSpec: [1×1 struct] tObs: [0 1 2 3] dObs: [731947 732313 732678 733043] CFlowT: {[4×1 double] [3×1 double] [2×1 double] [4]} Probs: {[3×1 double] [3×3 double] [3×5 double]} Connect: {[2] [2 3 4] [2 2 3 4 4]} FwdTree: {[1.0279] [1.0528 1.0356 1.0186] [1.0829 1.0652 1.0478 1.0306 1.0138] [1.0946 1.0767 1.0591 1.0418 1.0248]}
HWTree.FwdTree{1}
ans = 1.0279
HWTree.FwdTree{2}
ans = 1×3 1.0528 1.0356 1.0186
Use treeviewer to display the path of interest rates expressed in inverse-discount notation.
treeviewer
treeviewer(HWTree)
Use cvtree to convert the inverse-discount notation to interest-rate notation.
cvtree
RTree = cvtree(HWTree)
RTree = struct with fields: FinObj: 'HWRateTree' VolSpec: [1×1 struct] TimeSpec: [1×1 struct] RateSpec: [1×1 struct] tObs: [0 1 2 3] dObs: [731947 732313 732678 733043] CFlowT: {[4×1 double] [3×1 double] [2×1 double] [4]} Probs: {[3×1 double] [3×3 double] [3×5 double]} Connect: {[2] [2 3 4] [2 2 3 4 4]} RateTree: {[0.0275] [0.0514 0.0349 0.0185] [0.0796 0.0632 0.0467 0.0302 0.0137] [0.0904 0.0739 0.0574 0.0409 0.0245]}
RTree.RateTree{1}
ans = 0.0275
RTree.RateTree{2}
ans = 1×3 0.0514 0.0349 0.0185
use treeviewer to display the converted tree, showing the path of interest rates expressed as forward rates.
treeviewer(RTree)
Tree structure, specified by Heath-Jarrow-Morton, Black-Derman-Toy, Hull-White, Black-Karasinski, or Cox-Ingersoll-Ross tree structure that uses inverse-discount notation for forward rates.
Data Types: struct
struct
Tree structure using rate notation for forward rates, returned as a tree structure.
Introduced before R2006a
disc2rate | rate2disc
disc2rate
rate2disc
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의