www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/ComputeInstrumentSensitivitiesUsinganHJMInterestRateTreeExample.m

    %% Compute Instrument Sensitivities Using an HJM Interest-Rate Tree  

% Copyright 2015 The MathWorks, Inc.


%% 
% 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', {'Bond', 'Cap'}); 
instdisp(HJMSubSet)    

%% 
% Compute the |Delta| and |Gamma| for the cap and bond instruments. 
[Delta, Gamma] = hjmsens(HJMTree, HJMSubSet)