| Contents | Index |
BasketStockSpec = basketstockspec(Sigma, AssetPrice,
Quantity,
Correlation)
BasketStockSpec = basketstockspec(Sigma, AssetPrice,
Quantity,
Correlation, 'ParameterName',ParameterValue ...)
BasketStockSpec = basketstockspec(Sigma, AssetPrice, Quantity, Correlation) creates a basket stock structure.
BasketStockSpec = basketstockspec(Sigma, AssetPrice, Quantity, Correlation, '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.
BasketStockSpec |
Structure encapsulating the properties of a basket stock structure. |
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)
This returns:
BasketStockSpec =
FinObj: 'BasketStockSpec'
Sigma: [3x1 double]
AssetPrice: [3x1 double]
Quantity: [3x1 double]
Correlation: [3x3 double]
DividendType: {3x1 cell}
DividendAmounts: {3x1 cell}
ExDividendDates: {3x1 cell}
Examine the BasketStockSpec structure:
>>BasketStockSpec.Correlation
ans =
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)This returns:
BasketStockSpec =
FinObj: 'BasketStockSpec'
Sigma: [2x1 double]
AssetPrice: [2x1 double]
Quantity: [2x1 double]
Correlation: [2x2 double]
DividendType: {2x1 cell}
DividendAmounts: {2x1 cell}
ExDividendDates: {2x1 cell}
Examine the BasketStockSpec structure:
>>BasketStockSpec.DividendType
ans =
'cash'
'continuous'
basketbyju | basketbyls | basketsensbyju | basketsensbyls | intenvset | stockspec
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-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |