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

    %% Create Two Barrier Option Instruments  

% Copyright 2015 The MathWorks, Inc.


%% 
% Create an instrument set of two barrier options with the following data: 
OptSpec = {'put';'call'};
Strike = 112;
Settle = '01-Jan-2012';
ExerciseDates = '01-Jan-2015';
BarrierSpec = {'do';'ui'};
Barrier = [101;102];
AmericanOpt = 0;  

%% 
% Create the instrument set (|InstSet|) for the two barrier options. 
InstSet = instbarrier(OptSpec, Strike, Settle, ExerciseDates,AmericanOpt, BarrierSpec, Barrier);  

%% 
% Display the instrument set. 
instdisp(InstSet)