%% Price a 5% Fixed-Rate Note Using a Hull-White Interest-Rate Tree
% Load the file deriv.mat, which provides HWTree. The HWTree structure contains the time and interest-rate information needed to price the note.

load deriv.mat;

%
% Set the required values. Other arguments will use defaults.

CouponRate = 0.05;
Settle = '01-Jan-2004';
Maturity = '01-Jan-2006';

%
% Use fixedbyhw to compute the price of the note.

Price = fixedbyhw(HWTree, CouponRate, Settle, Maturity)

% Copyright 2015 The MathWorks, Inc.