www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/ComputeSensitivitiesforBarrierandLookbackInstrumentsUsinExample.m
%% Compute Sensitivities for Barrier and Lookback Instruments Using a crrtree % Copyright 2015 The MathWorks, Inc. %% % Load the CRR tree and instruments from the data file |deriv.mat|. Compute % the |Delta| and |Gamma| sensitivities of the barrier and lookback options % contained in the instrument set. load deriv.mat; CRRSubSet = instselect(CRRInstSet,'Type', ... {'Barrier', 'Lookback'}); instdisp(CRRSubSet) %% % Obtain the |Delta| and |Gamma| for the barrier and lookback options contained % in the instrument set. [Delta, Gamma] = crrsens(CRRTree, CRRSubSet)