| Contents | Index |
Volatility = impvbybls(RateSpec, StockSpec,
Settle,
Maturity, Strike, OptPrice, '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. | |
OptPrice | NINST-by-1 vector of European option prices from which the implied volatility of the underlying asset are derived. | |
| ||
Limit | (Optional) Positive scalar representing the upper bound of the implied volatility search interval. Default is 10, or 1000% per annum. | |
Tolerance | (Optional) Positive scalar implied volatility termination tolerance. Default is 1e-6. | |
Volatility = impvbybls(RateSpec, StockSpec, Settle, Maturity, Strike, OptPrice, 'Name1', Value1...) computes implied volatility using the Black-Scholes option pricing model.
Volatility is a NINST-by-1 vector of expected implied volatility values. If no solution is found, a NaN is returned.
Consider a European call and put options with an exercise price of $40 that expires on June 1, 2008. The underlying stock is trading at $45 on January 1, 2008 and the risk-free rate is 5% per annum. The option price is $7.10 for the call and $2.85 for the put. Using this data, calculate the implied volatility of the European call and put using the Black-Scholes option pricing model:
AssetPrice = 45;
Settlement = 'Jan-01-2008';
Maturity = 'June-01-2008';
Strike = 40;
Rates = 0.05;
OptionPrice = [7.10; 2.85];
OptSpec = {'call';'put'};
Define RateSpec and StockSpec :
RateSpec = intenvset('ValuationDate', Settlement, 'StartDates', Settlement,...
'EndDates', Maturity, 'Rates', Rates, 'Compounding', -1, 'Basis', 1);
StockSpec = stockspec(NaN, AssetPrice);
Calculate the implied volatility of the options:
ImpvVol = impvbybls(RateSpec, StockSpec, Settlement, Maturity, OptSpec,...
Strike, OptionPrice)
ImpvVol =
0.3175
0.4878
The implied volatility is 31.75% for the call and 48.78% for the put.
optstockbybls | optstocksensbybls
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 |