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

load deriv.mat

OptSpec = 'Put';
Strike = 30;
Settle = '01-Jan-2006';
ExerciseDates = ' 01-Jan-2010 ';
AmericanOpt = 1;

Price = optstockbyitt(ITTTree, OptSpec, Strike, Settle,ExerciseDates, AmericanOpt)

% Copyright 2015 The MathWorks, Inc.