| 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 |
HJMTree = hjmtree(VolSpec, RateSpec,
TimeSpec)
VolSpec | Volatility process specification. Sets the number of
factors and the rules for computing the volatility
|
RateSpec | Interest-rate specification for the initial rate curve. See intenvset for information on declaring an interest-rate variable. |
TimeSpec | Tree time layout specification. Defines the observation dates of the HJM tree and the compounding rule for date to time mapping and price-yield formulas. See hjmtimespec for information on the tree structure. |
HJMTree = hjmtree(VolSpec, RateSpec, TimeSpec) creates a structure containing time and forward-rate information on a bushy tree.
Using the data provided, create an HJM volatility specification (VolSpec), rate specification (RateSpec), and tree time layout specification (TimeSpec). Then use these specifications to create an 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)Use treeviewer to observe the tree you have created.
treeviewer(HJMTree)

hjmprice, hjmtimespec, hjmvolspec, intenvset
![]() | hjmtimespec | hjmvolspec | ![]() |
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-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |