| Contents | Index |
PriceSens = optstocksensbybls(RateSpec,
StockSpec, Settle,
Maturity, OptSpec, Strike,
'Name1', Value1...)
RateSpec | The annualized continuously compounded rate term structure. For information on the interest rate specification, see intenvset. |
StockSpec | Stock specification. See stockspec. |
Settle | NINST-by-1 vector of settlement or trade dates. |
Maturity | NINST-by-1 vector of maturity dates. |
OptSpec | NINST-by-1 cell array of strings 'call' or 'put'. |
Strike | NINST-by-1 vector of strike price values. |
OutSpec | (Optional) All optional inputs are specified as matching parameter name/value pairs. The parameter name is specified as a character string, followed by the corresponding parameter value. Parameter name/value pairs may be specified in any order; names are case-insensitive and partial string matches are allowed provided no ambiguities exist. Valid parameter names are:
|
PriceSens = optstocksensbybls(RateSpec, StockSpec, Settle, Maturity, OptSpec, Strike, 'Name1', Value1...) computes option prices and sensitivities using the Black-Scholes option pricing model.
PriceSens is a NINST-by-1 vector of expected prices or sensitivities values.
Note When using StockSpec with optstocksensbybls, you can modify StockSpec to handle other types of underliers when pricing instruments that use the Black-Scholes model. When pricing Futures (Black model), enter the following in StockSpec: DivType = 'Continuous'; DivAmount = RateSpec.Rates;
When pricing Foreign Currencies (Garman-Kohlhagen model), enter the following in StockSpec: DivType = 'Continuous'; DivAmount = ForeignRate; where ForeignRate is the continuously compounded, annualized risk free interest rate in the foreign country. |
Consider a European call and put options with an exercise price of $30 that expires on June 1, 2008. The underlying stock is trading at $30 on January 1, 2008 and has a volatility of 30% per annum. The annualized continuously compounded risk-free rate is 5% per annum. Using this data, compute the delta, gamma, and price of the options using the Black-Scholes model.
AssetPrice = 30; Strike = 30; Sigma = .30; Rates = 0.05; Settle = 'January-01-2008'; Maturity = 'June -01-2008';
Define RateSpec and StockSpec :
RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle, 'EndDates',...
Maturity, 'Rates', Rates, 'Compounding',-1, 'Basis', 1);
StockSpec = stockspec(Sigma, AssetPrice);
Define the options:
OptSpec = {'call', 'put'};Compute delta, gamma, and price for the European options:
OutSpec = {'Delta','Gamma','Price'};
[Delta, Gamma, Price] = optstocksensbybls(RateSpec, StockSpec, Settle,...
Maturity, OptSpec, Strike,'OutSpec', OutSpec)
Delta =
0.5810
-0.4190
Gamma =
0.0673
0.0673
Price =
2.6126
1.9941impvbybls | intenvset | optstockbybls | 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 |