hjmtree
Build Heath-Jarrow-Morton interest-rate tree
Description
Examples
Create a HJMTree
Using the data provided, create a HJM volatility specification (using hjmvolspec
), rate specification (using intenvset
), and tree time layout specification (using hjmtimespec
). Then use these specifications to create a HJM tree using hjmtree
.
Compounding = 1; ValuationDate = '01-01-2000'; StartDate = ['01-01-2000'; '01-01-2001'; '01-01-2002'; '01-01-2003'; '01-01-2004']; EndDates = ['01-01-2001'; '01-01-2002'; '01-01-2003'; '01-01-2004'; '01-01-2005']; Rates = [.1; .11; .12; .125; .13]; Volatility = [.2; .19; .18; .17; .16]; CurveTerm = [1; 2; 3; 4; 5]; HJMVolSpec = hjmvolspec('Stationary', Volatility , CurveTerm); RateSpec = intenvset('Compounding', Compounding,... 'ValuationDate', ValuationDate,... 'StartDates', StartDate,... 'EndDates', EndDates,... 'Rates', Rates); HJMTimeSpec = hjmtimespec(ValuationDate, EndDates, Compounding); HJMTree = hjmtree(HJMVolSpec, RateSpec, HJMTimeSpec)
HJMTree = struct with fields:
FinObj: 'HJMFwdTree'
VolSpec: [1x1 struct]
TimeSpec: [1x1 struct]
RateSpec: [1x1 struct]
tObs: [0 1 2 3 4]
dObs: [730486 730852 731217 731582 731947]
TFwd: {[5x1 double] [4x1 double] [3x1 double] [2x1 double] [4]}
CFlowT: {[5x1 double] [4x1 double] [3x1 double] [2x1 double] [5]}
FwdTree: {[5x1 double] [4x1x2 double] [3x2x2 double] [2x4x2 double] [1x8x2 double]}
Use treeviewer
to observe the tree you have created.
treeviewer(HJMTree)
Input Arguments
VolSpec
— Volatility process specification
structure
Volatility process specification, specified using the VolSpec
output obtained from hjmvolspec
. VolSpec
sets the number of factors and the rules for computing the volatility for each factor.
Data Types: struct
TimeSpec
— Time tree layout specification
structure
Time tree layout specification, specified using the TimeSpec
output obtained from hjmtimespec
. The TimeSpec defines the
observation dates of the HJM tree and the Compounding
rule for date
to time mapping and price-yield formulas.
Data Types: struct
Output Arguments
HJMTree
— Time and interest-rate information of a bushy tree
structure
Time and interest-rate information of a bushy tree, returned as a structure.
Version History
Introduced before R2006a
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)