| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Derivatives Toolbox |
| Contents | Index |
| Learn more about Financial Derivatives Toolbox |
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.
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 string matches are allowable, if no ambiguities exist.
RateSpec |
Annualized, continuously compounded rate term structure. For more information on the interest rate specification, see intenvset. |
BasketStockSpec |
BasketStock specification. For information on the basket of stocks specification, see basketstockspec. |
OptSpec |
String or 2-by-1 cell array of the strings 'call' or 'put'. |
Strike |
The option strike price:
|
Settle |
Scalar of settlement or trade date. |
ExerciseDates |
The exercise date for the option:
|
AmericanOpt |
Parameter values are a scalar flag.
Default: 0 |
NumPeriods |
Parameter value is a scalar number of simulation periods. 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 |
NumTrials |
Parameter value is a scalar number of independent sample paths (simulation trials). Default: 1000 |
OutSpec |
Parameter value is an NOUT-by-1 or 1-by-NOUT cell array of strings indicating the nature and order of the outputs for the function. Possible values are 'Price', 'Delta', 'Gamma', 'Vega', 'Lambda', 'Rho', 'Theta', and 'All'. For example, OutSpec = {'Price', 'Lamba', 'Rho'} specifies that the output is Price, Lambda, and Rho, in that order. OutSpec = {'All'} specifies that the output should be Delta, Gamma, Vega, Lambda, Rho, Theta, and Price, in that order. This is the same as specifying OutSpec as OutSpec = {'Delta', 'Gamma', 'Vega', 'Lambda', 'Rho', 'Theta', 'Price'};. Default: OutSpec = {'Price'} |
UndIdx |
Scalar of the indice of the underlying instrument to compute the sensitivity. Default: UndIdx = [] |
PriceSens |
Expected prices or sensitivities values. |
Find a European put basket option of two stocks. The basket contains 50% of each stock. The stocks are currently trading at $90 and $75, with annual volatilities of 15%. Assume that the correlation between the assets is zero. On May 1, 2009, an investor wants to buy a one-year put option with a strike price of $80. The current annualized, continuously compounded interest is 5%. Use this data to compute price and delta of the put basket option with the Longstaff-Schwartz approximation model.
Settle = 'May-1-2009';
Maturity = 'May-1-2010';
% 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.
NumInst = 2;
InstIdx = ones(NumInst,1);
Corr = diag(ones(NumInst,1), 0);
% Define BasketStockSpec
AssetPrice = [90; 75];
Volatility = 0.15;
Quantity = [0.50; 0.50];
BasketStockSpec = basketstockspec(Volatility, AssetPrice, Quantity, Corr);
% Compute the price of the put basket option. Calculate also the delta
% of the first stock.
OptSpec = {'put'};
Strike = 80;
OutSpec = {'Price','Delta'};
UndIdx = 1; % First element in the basket
[Price, Delta] = basketsensbyls(RateSpec, BasketStockSpec, OptSpec,...
Strike, Settle, Maturity,'OutSpec', OutSpec,'UndIdx', UndIdx)
This returns:
Price = 1.08519 Delta = -0.10311
Compute the Price and Delta of the basket with a correlation of -20%:
NewCorr = [1 -0.20; -0.20 1]; % Define the new BasketStockSpec. BasketStockSpec = basketstockspec(Volatility, AssetPrice, Quantity, NewCorr); % Compute the price and delta of the put basket option. [Price, Delta] = basketsensbyls(RateSpec, BasketStockSpec, OptSpec,... Strike, Settle, Maturity,'OutSpec', OutSpec,'UndIdx', UndIdx) Price = 0.83903 Delta = -0.08847
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.
![]() | basketsensbyju | basketstockspec | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |