%% Price a Floating-Strike Asian Option Using an EQP Equity Tree
% This example shows how to price a floating-strike Asian option using an EQP equity tree by loading the file deriv.mat, which provides EQPTree. The EQPTree structure contains the stock specification and time information needed to price the option.

load deriv.mat;

OptSpec = 'put';
Strike = NaN;
Settle = '01-Jan-2003';
ExerciseDates = '01-Jan-2004';

Price = asianbyeqp(EQPTree, OptSpec, Strike, Settle, ... 
ExerciseDates)

% Copyright 2015 The MathWorks, Inc.