This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Construct Heath-Jarrow-Morton interest-rate tree


HJMTree = hjmtree(VolSpec,RateSpec,TimeSpec)



Volatility process specification. Sets the number of factors and the rules for computing the volatility σ(t,T) for each factor. See hjmvolspec for information on the volatility process.


Interest-rate specification for the initial rate curve. See intenvset for information on declaring an interest-rate variable.


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)
HJMTree = 

      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.


Introduced before R2006a

Was this topic helpful?