%% Compute the Price for a Floating Lookback Option Using Monte Carlo Simulation
% Define the RateSpec.

StartDates = 'Jan-1-2013';
EndDates = 'Jan-1-2014';
Rates = 0.042;
Compounding = -1;
RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates,...
'EndDates', EndDates, 'Rates', Rates, 'Compounding', Compounding)

%
% Define the StockSpec.

AssetPrice = 50;
Sigma = 0.36;
StockSpec = stockspec(Sigma, AssetPrice)

%
% Define the floating lookback option.

Settle   = 'Jan-1-2013';
Maturity = 'April-1-2013'; 
OptSpec = 'put';
Strike = NaN;

%
% Compute the price of the European floating lookback option.

Price = lookbackbyls(RateSpec, StockSpec, OptSpec, Strike, Settle, Maturity)

% Copyright 2015 The MathWorks, Inc.