%% Set the Number of Levels and Node Times for an HJM Tree
% This example shows how to specify an eight-period tree with semiannual nodes (every six months) and use exponential compounding to report rates.

Compounding = -1;
ValuationDate = '15-Jan-1999';
Maturity = datemnth(ValuationDate, 6*(1:8)');
TimeSpec = hjmtimespec(ValuationDate, Maturity, Compounding)

% Copyright 2015 The MathWorks, Inc.