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

    %% Compute Sensitivities for Instruments Using an |eqptree|
%% 
% Load the EQP tree and instruments from the data file |deriv.mat|. Compute
% the |Delta| and |Gamma| sensitivities of the put options contained in
% the instrument set.  

% Copyright 2015 The MathWorks, Inc.

load deriv.mat; 

EQPSubSet = instselect(EQPInstSet, 'FieldName', 'OptSpec', ...
'Data', 'put')

instdisp(EQPSubSet)  

%% 
% Obtain the |Delta| and |Gamma| for the put options contained in the instrument
% set. 
[Delta, Gamma] = eqpsens(EQPTree, EQPSubSet)