%% Compute Instrument Sensitivities Using an HJM Interest-Rate Tree
% Load the tree and instruments from the deriv.mat data file. Compute Delta and Gamma for the cap and bond instruments contained in the instrument set.

load deriv.mat; 
HJMSubSet = instselect(HJMInstSet,'Type', {'Fixed', 'Cap'});  
instdisp(HJMSubSet)

%
% Compute the Delta and Gamma for the cap and bond instruments.

[Delta, Gamma] = hjmsens(HJMTree, HJMSubSet)

% Copyright 2015 The MathWorks, Inc.