%% Price a 10% Floor Instrument Using a BDT Interest-Rate Tree
% Load the file deriv.mat, which provides BDTTree. BDTTree contains the time and interest-rate information needed to price the floor instrument.

load deriv.mat;

%
% Set the required values. Other arguments will use defaults.

Strike = 0.10;
Settle = '01-Jan-2000';
Maturity = '01-Jan-2004';

%
% Use floorbybdt to compute the price of the floor instrument.

Price = floorbybdt(BDTTree, Strike, Settle, Maturity)

% Copyright 2015 The MathWorks, Inc.