%% Price a Bermudan Stock Option Using a CRR Binomial Tree
% Load the file deriv.mat, which provides CRRTree. The CRRTree structure contains the stock specification and time information needed to price the Bermudan option.

load deriv.mat;

% Option
OptSpec = 'Call';
Strike = [110,111,112,113]
Settle = '01-Jan-2003';
ExerciseDatesBerm={'01-Jan-2004', '01-Jan-2005','01-Jan-2006','01-Jan-2007'};

%
% Price the Bermudan option.

Price = optstockbycrr(CRRTree, OptSpec, Strike, Settle, ExerciseDatesBerm)

% Copyright 2015 The MathWorks, Inc.