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

    %% Determine the Price and Sensitivities for a |stttree| Instrument Set

%% 
% Load the data into the MATLAB(R) workspace. 
load deriv.mat  

%% 
% |STTTree| and |STTInstSet| are the input arguments required to call the
% function |sttprice|. Use the command |instdisp| to examine the set of
% instruments contained in the variable |STTInstSet|. 
instdisp(STTInstSet) 

%%
% The instrument set contains eight instruments: 
%  
% * Two vanilla options (|Call1|, |Put1|)  
% * One barrier option (|Barrier1|)  
% * One compound option (|Compound1|)  
% * Two lookback options (|Lookback1|, |Lookback2|)  
% * Two Asian options (|Asian1|, |Asian2|)    

%% 
% Use |sttsens| to calculate the price and sensitivities for each instrument
% in the instrument set. 
[Delta,Gamma,Vega,Price] = sttsens(STTTree, STTInstSet)