www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/PriceastttreeInstSetExample.m
%% Price 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 |sttprice| to calculate the price of each instrument in the instrument % set. Price = sttprice(STTTree, STTInstSet)