%% Compute Sensitivities for Barrier and Lookback Instruments Using a crrtree
% 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)

% Copyright 2015 The MathWorks, Inc.