This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Price European or American basket options using Monte Carlo simulations


Price = basketbyls(RateSpec,BasketStockSpec,OptSpec, Strike,Settle,ExerciseDates)
Price = basketbyls(RateSpec,BasketStockSpec,OptSpec,Strike,Settle,ExerciseDates,'ParameterName',ParameterValue, ...)


Price = basketbyls(RateSpec,BasketStockSpec,OptSpec, Strike,Settle,ExerciseDates) prices basket options using the Longstaff-Schwartz model.

For American options, the Longstaff-Schwartz least squares method is used to calculate the early exercise premium.

Price = basketbyls(RateSpec,BasketStockSpec,OptSpec,Strike,Settle,ExerciseDates,'ParameterName',ParameterValue, ...) accepts optional inputs as one or more comma-separated parameter/value pairs. 'ParameterName' is the name of the parameter inside single quotes. ParameterValue is the value corresponding to 'ParameterName'. Specify parameter-value pairs in any order. Names are case-insensitive and partial matches are allowable, if no ambiguities exist.

Input Arguments


Annualized, continuously compounded rate term structure. For more information on the interest rate specification, see intenvset.


BasketStock specification. For information on the basket of stocks specification, see basketstockspec.


Character vector or 2-by-1 cell array of character vectors with values of 'call' or 'put'.


The option strike price:

  • For a European or Bermuda option, Strike is a scalar (European) or 1-by-NSTRIKES (Bermuda) vector of strike price.

  • For an American option, Strike is a scalar vector of the strike price.


Scalar of the settlement or trade date specified as a character vector or serial date number.


The exercise date for the option:

  • For a European or Bermuda option, ExerciseDates is a 1-by-1 (European) or 1-by-NSTRIKES (Bermuda) vector of exercise dates. For a European option, there is only one ExerciseDate on the option expiry date.

  • For an American option, ExerciseDates is a 1-by-2 vector of exercise date boundaries. The option exercises on any date between, or including, the pair of dates on that row. If there is only one non-NaN date, or if ExerciseDates is 1-by-1, the option exercises between the Settle date and the single listed ExerciseDate.

Parameter–Value Pairs


Parameter values are a scalar flag.

  • 0 — European/Bermuda

  • 1 — American


For American options, the Longstaff-Schwartz least squares method is used to calculate the early exercise premium. For more information on the least squares method, see

Default: 0


Parameter value is a scalar number of simulation periods per trial. NumPeriods is considered only when pricing European basket options. For American and Bermuda basket options, NumPeriod equals the number of exercise days during the life of the option.

Default: 100


Parameter value is a scalar number of independent sample paths (simulation trials).

Default: 1000

Output Arguments


Price of the basket option.


collapse all

Find an American call basket option of three stocks. The stocks are currently trading at $35, $40 and $45 with annual volatilities of 12%, 15% and 18%, respectively. The basket contains 33.33% of each stock. Assume the correlation between all pair of assets is 50%. On May 1, 2009, an investor wants to buy a three-year call option with a strike price of $42. The current annualized continuously compounded interest rate is 5%. Use this data to compute the price of the call basket option using the Longstaff-Schwartz model.

Settle = 'May-1-2009';
Maturity  = 'May-1-2012';

% Define RateSpec
Rate = 0.05;
Compounding = -1;
RateSpec = intenvset('ValuationDate', Settle, 'StartDates',...
Settle, 'EndDates', Maturity, 'Rates', Rate, 'Compounding', Compounding);

% Define the Correlation matrix. Correlation matrices are symmetric,
% and have ones along the main diagonal.
Corr = [1 0.50 0.50; 0.50 1 0.50;0.50 0.50 1];

% Define BasketStockSpec
AssetPrice =  [35;40;45]; 
Volatility = [0.12;0.15;0.18];
Quantity = [0.333;0.333;0.333];
BasketStockSpec = basketstockspec(Volatility, AssetPrice, Quantity, Corr);

% Compute the price of the call basket option
OptSpec = {'call'};
Strike = 42;
AmericanOpt = 1; % American option
Price = basketbyls(RateSpec, BasketStockSpec, OptSpec, Strike, Settle, Maturity,...
Price = 5.4687

Increase the number of simulation trials to 2000 to give the following results:

NumTrial = 2000;
Price = basketbyls(RateSpec, BasketStockSpec, OptSpec, Strike, Settle, Maturity,...
Price = 5.5501


Longstaff, F.A., and E.S. Schwartz. “Valuing American Options by Simulation: A Simple Least-Squares Approach.” The Review of Financial Studies. Vol. 14, No. 1, Spring 2001, pp. 113–147.

Introduced in R2009b

Was this topic helpful?