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

    %% Price a Compound Option Using an ITT Tree
% This example shows how to price a compound option using a ITT tree by loading the file |deriv.mat|, which provides |ITTTree|. The |ITTTree| structure
% contains the stock specification and time information needed to price the option.
%%

% Copyright 2015 The MathWorks, Inc.

load deriv.mat

UOptSpec = 'Call';
UStrike = 99;
USettle = '01-Jan-2006';
UExerciseDates = '01-Jan-2010';
UAmericanOpt = 1;
COptSpec = 'Put';
CStrike = 5;
CSettle = '01-Jan-2006';
CExerciseDates = '01-Jan-2010';

Price = compoundbyitt(ITTTree, UOptSpec, UStrike, USettle, ... 
UExerciseDates, UAmericanOpt, COptSpec, CStrike, CSettle, ... 
CExerciseDates)