%% Set the Number of Levels and Node Times for a CIR Tree
% Set the number of levels and node times for an CIR tree by specifying a four-period tree with time steps of 1 year.

ValuationDate = 'Jan-1-2017'; 
Maturity = '01-Jan-2021'; 
NumPeriods = 4
CIRTimeSpec = cirtimespec(ValuationDate, Maturity, NumPeriods)

% Copyright 2012 The MathWorks, Inc.