Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

impvbybls

Determine implied volatility using Black-Scholes option pricing model

Syntax

Volatility = impvbybls(RateSpec,StockSpec,Settle,Maturity,OptSpec,Strike,OptPrice)
Volatility = impvbybls(___,Name,Value)

Description

example

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

example

Volatility = impvbybls(___,Name,Value) adds optional name-value pair arguments.

Examples

collapse all

This example shows how to compute the implied volatility using the Black-Scholes option pricing model. 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 the RateSpec and StockSpec
RateSpec = intenvset('ValuationDate', Settlement, 'StartDates', Settlement,...
'EndDates', Maturity, 'Rates', Rates, 'Compounding', -1, 'Basis', 1);

StockSpec = stockspec(NaN, AssetPrice);

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.

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 of serial date numbers or a date character vectors.

Data Types: double | char

Maturity date for the American option, specified as a NINST-by-1 vector of serial date numbers or a date character vectors.

Data Types: double | char

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 price values. 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 Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: Volatility = impvbybls(RateSpec,StockSpec,Settle,Maturity,OptSpec,Strike,OptPrice,'Limit',5,'Tolerance',1e-5)

collapse all

Upper bound of implied volatility search interval, specified as a positive scalar.

Data Types: double

Implied volatility search termination tolerance, specified as a positive scalar.

Data Types: double

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.

Introduced in R2008b

Was this topic helpful?