Main Content

impvbyblk

Determine implied volatility using Black option pricing model

Description

example

Volatility = impvbyblk(RateSpec,StockSpec,Settle,Maturity,OptSpec,Strike,OptPrice) computes implied volatility using the Black option pricing model.

example

Volatility = impvbyblk(___,Name,Value) specifies options using one or more name-value pair arguments in addition to the input arguments in the previous syntax.

Examples

collapse all

This example shows how to compute the implied volatility using the Black option pricing model. Consider a European call and put options on a futures contract with exercise prices of $30 for the put and $40 for the call that expire on September 1, 2008. Assume that on May 1, 2008 the contract is trading at $35. The annualized continuously compounded risk-free rate is 5% per annum. Find the implied volatilities of the stock, if on that date, the call price is $1.14 and the put price is $0.82.

AssetPrice = 35;
Strike = [30; 40];
Rates = 0.05;
Settle = datetime(2008,5,1);
Maturity = datetime(2008,9,1);

% define the RateSpec and StockSpec
RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle,...
'EndDates', Maturity, 'Rates', Rates, 'Compounding', -1);

StockSpec = stockspec(NaN, AssetPrice);

% define the options
OptSpec = {'put';'call'};

Price = [1.14;0.82];
Volatility = impvbyblk(RateSpec, StockSpec, Settle, Maturity, OptSpec,...
Strike, Price,'Method','jackel2016')
Volatility = 2×1

    0.4052
    0.3021

The implied volatility is 41% and 30%.

Input Arguments

collapse all

Interest-rate term structure (annualized and continuously compounded), specified by the RateSpec obtained from intenvset. For information on the interest-rate specification, see intenvset.

Data Types: struct

Stock specification for the underlying asset. For information on the stock specification, see stockspec.

stockspec handles several types of underlying assets. For example, for physical commodities the price is StockSpec.Asset, the volatility is StockSpec.Sigma, and the convenience yield is StockSpec.DividendAmounts.

Data Types: struct

Settlement date, specified as a NINST-by-1 vector using a datetime array, string array, or date character vectors.

To support existing code, impvbyblk also accepts serial date numbers as inputs, but they are not recommended.

Maturity date for the American option, specified as a NINST-by-1 vector using a datetime array, string array, or date character vectors.

To support existing code, impvbyblk also accepts serial date numbers as inputs, but they are not recommended.

Definition of the option from which the implied volatility is derived, specified as a NINST-by-1 cell array of character vectors with a value of 'call' or 'put'.

Data Types: char | cell

Option strike price value, specified as a nonnegative scalar or NINST-by-1 vector of strike prices. Each row is the schedule for one option.

Data Types: double

European option prices from which the implied volatility of the underlying asset is derived, specified as a nonnegative scalar or NINST-by-1 vector.

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: Volatility = impvbyblk(RateSpec,StockSpec,Settle,Maturity,OptSpec,Strike,OptPrice,'Limit',5,'Tolerance',1e-5)

Upper bound of implied volatility search interval, specified as the comma-separated pair consisting of 'Limit' and a positive scalar.

Note

If you are using Method with a value of 'jackel2016', the Limit argument is ignored.

Data Types: double

Implied volatility search termination tolerance, specified as the comma-separated pair consisting of 'Tolerance' and a positive scalar.

Note

If you are using Method with a value of 'jackel2016', the Tolerance argument is ignored.

Data Types: double

Method for computing implied volatility, specified as the comma-separated pair consisting of 'Method' and a character vector with a value of 'search' or 'jackel2016' or a string with a value of "search" or "jackel2016".

Data Types: char | string

Output Arguments

collapse all

Expected implied volatility values, returned as a NINST-by-1 vector. If no solution can be found, a NaN is returned.

References

[1] Jäckel, Peter. "Let's Be Rational." Wilmott Magazine., January, 2015 (https://onlinelibrary.wiley.com/doi/abs/10.1002/wilm.10395).

Version History

Introduced in R2008b

expand all