basketstockspec
Specify basket stock structure using Longstaff-Schwartz model
Syntax
Description
creates a basket stock structure.BasketStockSpec = basketstockspec(Sigma,AssetPrice,Quantity,Correlation)
specifies options using one or more name-value pair arguments in addition to the
input arguments in the previous syntax.BasketStockSpec = basketstockspec(___,Name,Value)
Examples
Find a basket option of three stocks. The stocks are currently trading at $56, $92 and $125 with annual volatilities of 20%, 12% and 15%, respectively. The basket option contains 25% of the first stock, 40% of the second stock, and 35% of the third. The first stock provides a continuous dividend of 1%, while the other two provide no dividends. The correlation between the first and second asset is 30%, between the second and third asset 11%, and between the first and third asset 16%. Use this data to create the BasketStockSpec structure:
AssetPrice = [56;92;125]; Sigma = [0.20;0.12;0.15]; % Create the Correlation matrix. Correlation matrices are symmetric and % have ones along the main diagonal. NumInst = 3; Corr = zeros(NumInst,1); Corr(1,2) = .30; Corr(2,3) = .11; Corr(1,3) = .16; Corr = triu(Corr,1) + tril(Corr',-1) + diag(ones(NumInst,1), 0); % Define dividends DivType = cell(NumInst,1); DivType{1}='continuous'; DivAmounts = cell(NumInst,1); DivAmounts{1} = 0.01; Quantity = [0.25; 0.40; 0.35]; BasketStockSpec = basketstockspec(Sigma, AssetPrice, Quantity, Corr, ... 'DividendType', DivType, 'DividendAmounts', DivAmounts)
BasketStockSpec = struct with fields:
FinObj: 'BasketStockSpec'
Sigma: [3×1 double]
AssetPrice: [3×1 double]
Quantity: [3×1 double]
Correlation: [3×3 double]
DividendType: {3×1 cell}
DividendAmounts: {3×1 cell}
ExDividendDates: {3×1 cell}
Examine the BasketStockSpec structure.
BasketStockSpec.Correlation
ans = 3×3
1.0000 0.3000 0.1600
0.3000 1.0000 0.1100
0.1600 0.1100 1.0000
Find a basket option of two stocks. The stocks are currently trading at $60 and $55 with volatilities of 30% per annum. The basket option contains 50% of each stock. The first stock provides a cash dividend of $0.25 on May 1, 2009 and September 1, 2009. The second stock provides a continuous dividend of 3%. The correlation between the assets is 40%. Use this data to create the structure BasketStockSpec:
AssetPrice = [60;55]; Sigma = [0.30;0.30]; % Create the Correlation matrix. Correlation matrices are symmetric and % have ones along the main diagonal. Correlation = [1 0.40;0.40 1]; % Define dividends NumInst = 2; DivType = cell(NumInst,1); DivType{1}='cash'; DivType{2}='continuous'; DivAmounts = cell(NumInst,1); DivAmounts{1} = [0.25 0.25]; DivAmounts{2} = 0.03; ExDates = cell(NumInst,1); ExDates{1} = {'May-1-2009' 'Sept-1-2009'}; Quantity = [0.5; 0.50]; BasketStockSpec = basketstockspec(Sigma, AssetPrice, Quantity, Correlation, ... 'DividendType', DivType, 'DividendAmounts', DivAmounts, 'ExDividendDates',ExDates)
BasketStockSpec = struct with fields:
FinObj: 'BasketStockSpec'
Sigma: [2×1 double]
AssetPrice: [2×1 double]
Quantity: [2×1 double]
Correlation: [2×2 double]
DividendType: {2×1 cell}
DividendAmounts: {2×1 cell}
ExDividendDates: {2×1 cell}
Examine the BasketStockSpec structure.
BasketStockSpec.DividendType
ans = 2×1 cell
{'cash' }
{'continuous'}
Input Arguments
Annual price volatility of the underlying security, specified as an
NINST-by-1 vector in decimals.
Data Types: double
Underlying asset price values at time 0, specified as a
NINST-by-1 vector.
Data Types: double
Quantities of the instruments contained in the basket, specified as an
NINST-by-1 vector.
Data Types: double
Correlation values, specified as an
NINST-by-1 matrix.
Data Types: double
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
Example: BasketStockSpec =
basketstockspec(Sigma,AssetPrice,Quantity,Correlation,'DividendType',DivType,'DividendAmounts',DivAmounts)
Dividend amounts for basket instruments, specified as the
comma-separated pair consisting of 'DividendAmounts'
and an NINST-by-1 cell array. Each
element of the cell array is a
1-by-NDIV row vector of cash
dividends or a scalar representing a continuous annualized dividend
yield for the corresponding instrument.
Data Types: double
Stock dividend type, specified as the comma-separated pair consisting
of 'DividendType' and an
NINST-by-1 cell array of
character vectors specifying each stock's dividend type. Dividend type
must be either cash for actual dollar dividends or
continuous for continuous dividend yield.
Data Types: char | cell
Ex-dividend dates for the basket instruments, specified as the
comma-separated pair consisting of 'ExDividendDates'
and an NINST-by-1 cell array
specifying the ex-dividend dates for the basket instruments. Each row is
a 1-by-NDIV matrix of ex-dividend
dates for cash type. For rows that correspond to
basket instruments with continuous dividend type, the
cell is empty. If none of the basket instruments pay
continuous dividends, do not specify
ExDividendDates.
Data Types: cell
Output Arguments
Structure encapsulating the properties of a basket stock structure, returned as a structure.
Version History
Introduced in R2009b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)