%% Simulate Term Structures for the HullWhite1F Model
% Create a HW1F object.

Settle = datenum('15-Dec-2007');
CurveTimes = [1:5 7 10 20]';
ZeroRates = [.01 .018 .024 .029 .033 .034 .035 .034]';
CurveDates = daysadd(Settle,360*CurveTimes,1);

irdc = IRDataCurve('Zero',Settle,CurveDates,ZeroRates);

alpha = .1;
sigma = .01;
 
HW1F = HullWhite1F(irdc,alpha,sigma)

%
% Simulate the term structures for the specified HW1F object.

SimPaths = simTermStructs(HW1F, 10,'nTrials',100);

% Copyright 2015 The MathWorks, Inc.