Main Content

bates

Batesstochastic volatility model

Since R2020a

Description

Thebatesfunction creates abatesobject, which represents a Bates model.

The Bates model is a bivariate composite model that derives from thehestonobject. The Bates model is composed of two coupled and dissimilar univariate models, each driven by a single Brownian motion source of risk and a single compound Poisson process representing the arrivals of important events overNPeriodsconsecutive observation periods. The Bates model approximates continuous-time Bates stochastic volatility processes.

The first univariate model is aGBMmodel with a stochastic volatility function and a stochastic jump process, and usually corresponds to a price process whose variance rate is governed by the second univariate model. The second model is a Cox-Ingersoll-Ross (CIR) square root diffusion model that describes the evolution of the variance rate of the coupledGBMprice process.

Bates models are bivariate composite models. Each Bates model consists of two coupled univariate models:

  • A geometric Brownian motion (gbm) model with a stochastic volatility function and jumps.

    d X 1 t = B ( t ) X 1 t d t + X 2 t X 1 t d W 1 t + Y ( t ) X 1 t d N t

    This model usually corresponds to a price process whose volatility (variance rate) is governed by the second univariate model.

  • A Cox-Ingersoll-Ross (cir) square root diffusion model.

    d X 2 t = S ( t ) [ L ( t ) X 2 t ] d t + V ( t ) X 2 t d W 2 t

    This model describes the evolution of the variance rate of the coupled Bates price process.

Creation

Description

example

Bates= bates(Return,Speed,Level,Volatility,JumpFreq,JumpMean,JumpVol)create abatesobject with the default options.

Since Bates models are bivariate models composed of coupled univariate models, all required inputs correspond to scalar parameters. Specify required inputs as one of two types:

  • MATLAB®array. Specify an array to indicate a static (non-time-varying) parametric specification. This array fully captures all implementation details, which are clearly associated with a parametric form.

  • MATLAB function. Specify a function to provide indirect support for virtually any static, dynamic, linear, or nonlinear model. This parameter is supported by an interface because all implementation details are hidden and fully encapsulated by the function.

Note

You can specify combinations of array and function input parameters as needed. Moreover, a parameter is identified as a deterministic function of time if the function accepts a scalar timetas its only input argument. Otherwise, a parameter is assumed to be a function of timetand stateXtand is invoked with both input arguments.

example

Bates= bates(___,名称,值)setsProperties使用name-value pair arguments in addition to the input arguments in the preceding syntax. Enclose each property name in quotes.

Thebatesobject has the followingProperties:

  • StartTime— Initial observation time

  • StartState— Initial state at timeStartTime

  • Correlation— Access function for theCorrelationinput argument

  • Drift— Composite drift-rate function

  • Diffusion— Composite diffusion-rate function

  • Simulation— A simulation function or method

输入参数

expand all

Expected mean instantaneous rate of return of the GBM price process, specified as an array, or a deterministic function of time.

If you specifyReturnas an array, it must be scalar.

If you specifyReturnas a deterministic function of time, you callReturnwith a real-valued scalar timetas its only input, it must return a scalar.

If you specifyReturnas a deterministic function of time and state, it must return a scalar when you call it with two inputs:

  • A real-valued scalar observation timet

  • A2-by-1bivariate state vectorXt

Data Types:double|function_handle

Mean-reversion speed of the CIR stochastic variance process, specified as an array or deterministic function of time.

If you specifySpeedas an array, it must be a scalar.

If you specifySpeedas a deterministic function of time, you callSpeedwith a real-valued scalar timetas its only input, it must return a scalar.

If you specifySpeedas a function of time and state, the function calculates the speed of mean reversion. This function must return a scalar of reversion rates when you call it with two inputs:

  • A real-valued scalar observation timet

  • A2-by-1bivariate state vectorXt

Note

Althoughbatesenforces no restrictions onSpeed, the mean-reversion speed is nonnegative such that the underlying process reverts to some stable level.

Data Types:double|function_handle

Reversion level or long-run average of the CIR stochastic variance process, specified as an array, or deterministic function of time.

If you specifyLevelas an array, it must be a scalar.

If you specifyLevelas a deterministic function of time, you callLevelwith a real-valued scalar timetas its only input, it must return a scalar.

If you specifyLevelas a deterministic function of time and state, it must return a scalar of reversion levels when you call it with two inputs:

  • A real-valued scalar observation timet

  • A2-by-1bivariate state vectorXt

Data Types:double|function_handle

Instantaneous volatility of the CIR stochastic variance process (often called thevolatility of volatilityorvolatility of variance), specified as a scalar, a deterministic function of time, or a deterministic function of time and state.

If you specifyVolatilityas a scalar, it represents the instantaneous volatility of the CIR stochastic variance model.

If you specifyVolatilityas a deterministic function of time, you callVolatilitywith a real-valued scalar timetas its only input, it must return a scalar.

If you specifyVolatilityas a deterministic function time and state,Volatilitymust return a scalar when you call it with two inputs:

  • A real-valued scalar observation timet

  • A2-by-1bivariate state vectorXt

Note

Althoughbatesenforces no restrictions onVolatility, the volatility is usually nonnegative.

Data Types:double|function_handle

Instantaneous jump frequencies representing the intensities (the mean number of jumps per unit time) of Poisson processes (Nt) that drive the jump simulation, specified as an array, a deterministic function of time, or a deterministic function of time and state.

If you specifyJumpFreqas an array, it must be a scalar.

If you specifyJumpFreqas a deterministic function of time, you callJumpFreqwith a real-valued scalar timetas its only input, it must return a scalar.

If you specifyJumpFreqas a function of time and state,JumpFreqmust return a scalar when you call it with two inputs:

  • A real-valued scalar observation timet

  • A2-by-1bivariate state vectorXt

Data Types:double|function_handle

Instantaneous mean of random percentage jump sizesJ, where log(1+J) is normally distributed with mean (log(1+JumpMean) - 0.5 ×JumpVol2) and standard deviationJumpVol, specified as an array, a deterministic function of time, or a deterministic function of time and state.

If you specifyJumpMeanas an array, it must be a scalar.

If you specifyJumpMeanas a deterministic function of time, you callJumpMeanwith a real-valued scalar timetas its only input, it must return a scalar.

If you specifyJumpMeanas a function of time and state,JumpMeanmust return a scalar when you call it with two inputs:

  • A real-valued scalar observation timet

  • A2-by-1bivariate state vectorXt

Data Types:double|function_handle

Instantaneous standard deviation of log(1+J), specified as an array, a deterministic function of time, or a deterministic function of time and state.

If you specifyJumpVolas an array, it must be a scalar.

If you specifyJumpVolas a deterministic function of time, you callJumpVolwith a real-valued scalar timetas its only input, it must return a scalar.

If you specifyJumpVolas a function of time and state,JumpVolmust return a scalar when you call it with two inputs:

  • A real-valued scalar observation timet

  • A2-by-1bivariate state vectorXt

Data Types:double|function_handle

Properties

expand all

Starting time of first observation, applied to all state variables, specified as a scalar.

Data Types:double

Initial values of state variables, specified as a scalar, column vector, or matrix.

IfStartStateis a scalar,batesapplies the same initial value to all state variables on all trials.

IfStartStateis a bivariate column vector,batesapplies a unique initial value to each state variable on all trials.

IfStartStateis a matrix,batesapplies a unique initial value to each state variable on each trial.

Data Types:double

Correlation between Gaussian random variates drawn to generate the Brownian motion vector (Wiener processes), specified as a scalar, a2-by-2positive semidefinite matrix, or as a deterministic functionCtthat accepts the current timetand returns an2-by-2positive semidefinite correlation matrix. IfCorrelationis not a symmetric positive semidefinite matrix, usenearcorrto create a positive semidefinite matrix for a correlation matrix.

ACorrelationmatrix represents a static condition.

If you specifyCorrelationas a deterministic function of time,Correlationallows you to specify a dynamic correlation structure.

Data Types:double

This property is read-only.

Drift-rate component of continuous-time stochastic differential equations (SDEs), specified as a drift object or function accessible by (t,Xt).

The drift rate specification supports the simulation of sample paths ofNVarsstate variables driven byNBrownsBrownian motion sources of risk overNPeriodsconsecutive observation periods, approximating continuous-time stochastic processes.

Use thedriftfunction to createdriftobjects of the form

F ( t , X t ) = A ( t ) + B ( t ) X t

Here:

  • Ais anNVars-by-1vector-valued function accessible by the (t,Xt) interface.

  • Bis anNVars-by-NVarsmatrix-valued function accessible by the (t,Xt) interface.

The displayed parameters for adriftobject follow.

  • Rate— Drift-rate function,F(t,Xt)

  • A— Intercept term,A(t,Xt), ofF(t,Xt)

  • B— First-order term,B(t,Xt), ofF(t,Xt)

AandBenable you to query the original inputs. The function stored inRatefully encapsulates the combined effect ofAandB.

SpecifyingABas MATLAB double arrays clearly associates them with a linear drift rate parametric form. However, specifying eitherAorBas a function allows you to customize virtually any drift-rate specification.

Note

You can expressdriftanddiffusionobjects in the most general form to emphasize the functional (t,Xt) interface. However, you can specify the componentsAandBas functions that adhere to the common (t,Xt) interface, or as MATLAB arrays of appropriate dimension.

Example:F = drift(0, 0.1) % Drift-rate function F(t,X)

Data Types:object

This property is read-only.

Diffusion-rate component of continuous-time stochastic differential equations (SDEs), specified as adriftobject or function accessible by (t,Xt).

The diffusion-rate specification supports the simulation of sample paths ofNVarsstate variables driven byNBrownsBrownian motion sources of risk overNPeriodsconsecutive observation periods for approximating continuous-time stochastic processes.

Use thediffusionfunction to creatediffusionobjects of the form

G ( t , X t ) = D ( t , X t α ( t ) ) V ( t )

Here:

  • Dis anNVars-by-NVarsdiagonal matrix-valued function.

  • Each diagonal element ofDis the corresponding element of the state vector raised to the corresponding element of an exponentAlpha, which is anNVars-by-1vector-valued function.

  • Vis anNVars-by-NBrownsmatrix-valued volatility rate functionSigma.

  • AlphaandSigmaare also accessible using the (t,Xt) interface.

The displayed parameters for adiffusionobject are:

  • Rate— Diffusion-rate function,G(t,Xt)

  • Alpha— State vector exponent, which determines the format ofD(t,Xt)ofG(t,Xt)

  • Sigma— Volatility rate,V(t,Xt), ofG(t,Xt)

AlphaandSigmaenable you to query the original inputs. (The combined effect of the individualAlphaandSigmaparameters is fully encapsulated by the function stored inRate.) TheRatefunctions are the calculation engines for thedriftanddiffusionobjects, and are the only parameters required for simulation.

Note

You can expressdriftanddiffusionobjects in the most general form to emphasize the functional (t,Xt) interface. However, you can specify the componentsAandBas functions that adhere to the common (t,Xt) interface, or as MATLAB arrays of appropriate dimension.

Example:G = diffusion(1, 0.3) % Diffusion-rate function G(t,X)

Data Types:object

User-defined simulation function or SDE simulation method, specified as a function or SDE simulation method.

Data Types:function_handle

Object Functions

simByEuler SimulateBatessample paths by Euler approximation
simByQuadExp SimulateBates,Heston, andCIRsample paths by quadratic-exponential discretization scheme
simulate Simulate multivariate stochastic differential equations (SDEs) forSDE,BM,GBM,CEV,CIR,HWV,Heston,SDEDDO,SDELD,SDEMRD,Merton, orBatesmodels
simByTransition SimulateBatessample paths with transition density
simByMilstein SimulateBatessample paths by Milstein approximation

Examples

collapse all

Bates models are bivariate composite models, composed of two coupled and dissimilar univariate models, each driven by a single Brownian motion source of risk and a single compound Poisson process representing the arrivals of important events overNPeriodsconsecutive observation periods. The simulation approximates continuous-time Bates stochastic volatility processes.

Create abatesobject.

AssetPrice = 80; Return = 0.03; JumpMean = 0.02; JumpVol = 0.08; JumpFreq = 0.1; V0 = 0.04; Level = 0.05; Speed = 1.0; Volatility = 0.2; Rho = -0.7; StartState = [AssetPrice;V0]; Correlation = [1 Rho;Rho 1]; batesObj = bates(Return, Speed, Level, Volatility,...JumpFreq, JumpMean, JumpVol,'startstate',StartState,...'correlation',Correlation)
batesObj =类贝茨:贝茨二元随机Volatility -------------------------------------------------- Dimensions: State = 2, Brownian = 2 -------------------------------------------------- StartTime: 0 StartState: 2x1 double array Correlation: 2x2 double array Drift: drift rate function F(t,X(t)) Diffusion: diffusion rate function G(t,X(t)) Simulation: simulation method/function simByEuler Return: 0.03 Speed: 1 Level: 0.05 Volatility: 0.2 JumpFreq: 0.1 JumpMean: 0.02 JumpVol: 0.08

More About

expand all

Algorithms

The Bates model (Bates 1996) is an extension of the Heston model and adds not only stochastic volatility, but also the jump diffusion parameters as in Merton (1976) were also added to model sudden asset price movements.

Under the risk-neutral measure the model is expressed as follows

d S t = ( γ q λ p μ j ) S t d t + υ t S t d W t + J S t d P t d υ t = κ ( θ υ t ) d t + σ υ υ t d W t υ E [ d W t d W t υ ] = p d t prob ( d P t = 1 ) = λ p d t

Here:

ᵞ is the continuous risk-free rate.

qis the continuous dividend yield.

Jis the random percentage jump size conditional on the jump occurring, where

ln ( 1 + J ) ~ N ( ln(1+ u j ) δ 2 2 , δ 2

(1+J) has a lognormal distribution:

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

Here:

μjis the mean ofJj> -1).

ƛpis the annual frequency (intensity) of the Poisson processPtp≥ 0).

υ is the initial variance of the underlying asset (υ0> 0)。

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

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

συis the volatility of volatility (συ> 0)。

pis the correlation between the Weiner processesWtandWtυ(-1 ≤p≤ 1).

The "Feller condition" ensures positive variance: (2κθ > συ2).

The stochastic volatility along with the jump help better model the asymmetric leptokurtic features, the volatility smile, and the large random fluctuations such as crashes and rallies.

References

[1] Aït-Sahalia, Yacine. “Testing Continuous-Time Models of the Spot Interest Rate.”Review of Financial Studies9, no. 2 ( Apr. 1996): 385–426.

[2] Aït-Sahalia, Yacine. “Transition Densities for Interest Rate and Other Nonlinear Diffusions.”The Journal of Finance54, no. 4 (Aug. 1999): 1361–95.

[3] Glasserman, Paul.Monte Carlo Methods in Financial Engineering. New York: Springer-Verlag, 2004.

[4] Hull, John C.Options, Futures and Other Derivatives. 7th ed, Prentice Hall, 2009.

[5] Johnson, Norman Lloyd, Samuel Kotz, and Narayanaswamy Balakrishnan.Continuous Univariate Distributions. 2nd ed. Wiley Series in Probability and Mathematical Statistics. New York: Wiley, 1995.

[6] Shreve, Steven E.Stochastic Calculus for Finance. New York: Springer-Verlag, 2004.

Version History

Introduced in R2020a

expand all