Main Content

optByBatesFD

Option price by Bates model using finite differences

Since R2019a

Description

example

[Price,PriceGrid,AssetPrices,Variances,Times] = optByBatesFD(Rate,AssetPrice,Settle,ExerciseDates,OptSpec,Strike,V0,ThetaV,Kappa,SigmaV,RhoSV,MeanJ,JumpVol,JumpFreq) computes a vanilla European or American option price by the Bates model, using the alternating direction implicit (ADI) method.

Note

Alternatively, you can use the Vanilla object to price vanilla options. For more information, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

example

[Price,PriceGrid,AssetPrices,Variances,Times] = optByBatesFD(___,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

Define the option variables and Bates model parameters.

AssetPrice = 90;
Strike = 100;
Rate = 0.03;
Settle = datetime(2018,1,10);
ExerciseDates = datetime(2018,7,2);

V0 = 0.04;
ThetaV = 0.04;
Kappa = 2;
SigmaV = 0.25;
RhoSV = -0.5;
JumpVol = 0.4;
MeanJ = exp(-0.5+JumpVol.^2/2)-1;
JumpFreq = 0.2;

Compute the American put option price using the finite differences method.

OptSpec = 'Put';
Price = optByBatesFD(Rate, AssetPrice, Settle, ExerciseDates, OptSpec, Strike, ...
V0, ThetaV, Kappa, SigmaV, RhoSV, MeanJ, JumpVol, JumpFreq, 'AmericanOpt', 1)
Price = 11.4925

Input Arguments

collapse all

Continuously compounded risk-free interest rate, specified as a scalar decimal.

Data Types: double

Current underlying asset price, specified as a scalar numeric.

Data Types: double

Option settlement date, specified as a scalar datetime, string, or data character vector.

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

Option exercise dates, specified as a datetime array, string array, or date character vectors:

  • For a European option, use a scalar datetime, string, or data character vector. For a European option, ExerciseDates contains only one value: the option expiry date.

  • For an American option, use a 1-by-2 vector of dates to specify the exercise date boundaries. An American option can be exercised on any date between or including the pair of dates. If only one non-NaN date is listed, then the option can be exercised between Settle date and the single listed value in ExerciseDates.

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

Definition of the option, specified as a scalar using a character vector or string with a value of 'call' or 'put'.

Data Types: cell | string

Option strike price value, specified as a scalar numeric.

Data Types: double

Initial variance of the underling asset, specified as a scalar numeric.

Data Types: double

Long-term variance of the underling asset, specified as a scalar numeric.

Data Types: double

Mean revision speed for the underlying asset, specified as a scalar numeric.

Data Types: double

Volatility of the variance of the underling asset, specified as a scalar numeric.

Data Types: double

Correlation between the Wiener processes for the underlying asset and its variance, specified as a scalar numeric.

Data Types: double

Mean of the random percentage jump size (J), specified as a scalar decimal where log(1+J) is normally distributed with the mean (log(1+MeanJ)-0.5*JumpVol^2) and the standard deviation JumpVol.

Data Types: double

Standard deviation of log(1+J) where J is the random percentage jump size, specified as a scalar decimal.

Data Types: double

Annual frequency of the Poisson jump process, specified as a scalar numeric.

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: [Price,PriceGrid] = optByBatesFD(Rate,AssetPrice,Settle,ExerciseDates,OptSpec,Strike,V0,ThetaV,Kappa,SigmaV,RhoSV,MeanJ,JumpVol,JumpFreq,'Basis',7)

Day-count basis of the instrument, specified as the comma-separated pair consisting of 'Basis' and a scalar using a supported value:

  • 0 = actual/actual

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (PSA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ICMA)

  • 9 = actual/360 (ICMA)

  • 10 = actual/365 (ICMA)

  • 11 = 30/360E (ICMA)

  • 12 = actual/365 (ISDA)

  • 13 = BUS/252

For more information, see Basis.

Data Types: double

Continuously compounded underlying asset yield, specified as the comma-separated pair consisting of 'DividendYield' and a scalar numeric.

Note

If you enter a value for DividendYield, then set DividendAmounts and ExDividendDates = [ ] or do not enter them. If you enter values for DividendAmounts and ExDividendDates, then set DividendYield = 0.

Data Types: double

Cash dividend amounts, specified as the comma-separated pair consisting of 'DividendAmounts' and an NDIV-by-1 vector.

Note

Each dividend amount must have a corresponding ex-dividend date. If you enter values for DividendAmounts and ExDividendDates, then set DividendYield = 0.

Data Types: double

Ex-dividend dates, specified as the comma-separated pair consisting of 'ExDividendDates' and an NDIV-by-1 vector using a datetime array, string array, or date character vectors.

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

Maximum price for the price grid boundary, specified as the comma-separated pair consisting of 'AssetPriceMax' and a positive scalar numeric.

Data Types: double

Maximum variance for the variance grid boundary, specified as the comma-separated pair consisting of 'VarianceMax' as a scalar numeric.

Data Types: double

Size of the asset grid for finite difference grid, specified as the comma-separated pair consisting of 'AssetGridSize' and a scalar numeric.

Data Types: double

Number of nodes of the variance grid for the finite difference grid, specified as the comma-separated pair consisting of 'VarianceGridSize' and a scalar numeric.

Data Types: double

Number of nodes of the time grid for the finite difference grid, specified as the comma-separated pair consisting of 'TimeGridSize' and a positive numeric scalar.

Data Types: double

Option type, specified as the comma-separated pair consisting of 'AmericanOpt' and a scalar flag with one of these values:

  • 0 — European

  • 1 — American

Data Types: double

Output Arguments

collapse all

Option price, returned as a scalar numeric.

Grid containing prices calculated by the finite difference method, returned as a two-dimensional grid with size AssetGridSizeTimeGridSize. The number of columns is not necessarily equal to the TimeGridSize because exercise the function adds exercise and ex-dividend dates to the time grid. PriceGrid(:, :, end) contains the price for t = 0.

Prices of the asset corresponding to the first dimension of PriceGrid, returned as a vector.

Variances corresponding to the second dimension of PriceGrid, returned as a vector.

Times corresponding to the third dimension of PriceGrid, returned as a vector.

More About

collapse all

Vanilla Option

A vanilla option is a category of options that includes only the most standard components.

A vanilla option has an expiration date and straightforward strike price. American-style options and European-style options are both categorized as vanilla options.

The payoff for a vanilla option is as follows:

  • For a call: max(StK,0)

  • For a put: max(KSt,0)

where:

St is the price of the underlying asset at time t.

K is the strike price.

For more information, see Vanilla Option.

Bates Stochastic Volatility Jump Diffusion Model

The Bates model [1] extends the Heston model by including stochastic volatility and (similar to Merton) jump diffusion parameters in the modeling of sudden asset price movements.

The stochastic differential equation is:

dSt=(rqλpμJ)Stdt+vtStdWt+JStdPtdvt=κ(θvt)dt+σvvtdWtE[dWtdWtv]=pdtprob(dPt=1)=λpdt

where:

r is the continuous risk-free rate.

q is the continuous dividend yield.

St is the asset price at time t.

vt is the asset price variance at time t.

J is the random percentage jump size conditional on the jump occurring, where ln(1+J) is normally distributed with mean ln(1+μJ)δ22 and the standard deviation δ, and (1+J) has a lognormal distribution:

1(1+J)δ2πexp{[ln(1+J)(ln(1+μJ)δ22]2δ22}

where:

v0 is the initial variance of the asset price at t = 0 (v0> 0).

θ is the long-term variance level for (θ > 0).

κ is the mean reversion speed for (κ > 0).

σv is the volatility of variance for (σv > 0).

p is the correlation between the Wiener processes Wt and Wtv for (-1 ≤ p ≤ 1).

μJ is the mean of J for (μJ > -1).

δ is the standard deviation of ln(1+J) for (δ ≥ 0).

λp is the annual frequency (intensity) of Poisson process Pt for (λp ≥ 0).

References

[1] Bates, D. S. "Jumps and Stochastic Volatility: Exchange Rate Processes Implicit in Deutsche Mark Options." The Review of Financial Studies. Vol. 9, Number 1, 1996.

Version History

Introduced in R2019a

expand all