bates

`Bates` stochastic volatility model

Description

The `bates` function creates a `bates` object, which represents a Bates model.

The Bates model is a bivariate composite model that derives from the `heston` object. 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 over `NPeriods` consecutive observation periods. The Bates model approximates continuous-time Bates stochastic volatility processes.

The first univariate model is a `GBM` model 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 coupled `GBM` price 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}_{1t}=B\left(t\right){X}_{1t}dt+\sqrt{{X}_{2t}}{X}_{1t}d{W}_{1t}+Y\left(t\right){X}_{1t}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}_{2t}=S\left(t\right)\left[L\left(t\right)-{X}_{2t}\right]dt+V\left(t\right)\sqrt{{X}_{2t}}d{W}_{2t}$`

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

Creation

Syntax

``Bates = bates(Return,Speed,Level,Volatility,JumpFreq,JumpMean,JumpVol)``
``Bates = bates(___,Name,Value)``

Description

example

````Bates = bates(Return,Speed,Level,Volatility,JumpFreq,JumpMean,JumpVol)` create a `bates` object 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. NoteYou 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 time `t` as its only input argument. Otherwise, a parameter is assumed to be a function of time t and state Xt and is invoked with both input arguments. ```

example

````Bates = bates(___,Name,Value)` sets Properties using name-value pair arguments in addition to the input arguments in the preceding syntax. Enclose each property name in quotes.The `bates` object has the following Properties: `StartTime` — Initial observation time`StartState` — Initial state at time `StartTime``Correlation` — Access function for the `Correlation` input argument`Drift` — Composite drift-rate function`Diffusion` — Composite diffusion-rate function`Simulation` — A simulation function or method ```

Input Arguments

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 specify `Return` as an array, it must be scalar.

If you specify `Return` as a deterministic function of time, you call `Return` with a real-valued scalar time `t` as its only input, it must return a scalar.

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

• A real-valued scalar observation time t

• A `2`-by-`1` bivariate state vector Xt

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 specify `Speed` as an array, it must be a scalar.

If you specify `Speed` as a deterministic function of time, you call `Speed` with a real-valued scalar time `t` as its only input, it must return a scalar.

If you specify `Speed` as 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 time t

• A `2`-by-`1` bivariate state vector Xt

Note

Although `bates` enforces no restrictions on `Speed`, 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 specify `Level` as an array, it must be a scalar.

If you specify `Level` as a deterministic function of time, you call `Level` with a real-valued scalar time `t` as its only input, it must return a scalar.

If you specify `Level` as 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 time t

• A `2`-by-`1` bivariate state vector Xt

Data Types: `double` | `function_handle`

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

If you specify `Volatility` as a scalar, it represents the instantaneous volatility of the CIR stochastic variance model.

If you specify `Volatility` as a deterministic function of time, you call `Volatility` with a real-valued scalar time `t` as its only input, it must return a scalar.

If you specify `Volatility` as a deterministic function time and state, `Volatility` must return a scalar when you call it with two inputs:

• A real-valued scalar observation time t

• A `2`-by-`1` bivariate state vector Xt

Note

Although `bates` enforces no restrictions on `Volatility`, 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 specify `JumpFreq` as an array, it must be a scalar.

If you specify `JumpFreq` as a deterministic function of time, you call `JumpFreq` with a real-valued scalar time `t` as its only input, it must return a scalar.

If you specify `JumpFreq` as a function of time and state, `JumpFreq` must return a scalar when you call it with two inputs:

• A real-valued scalar observation time t

• A `2`-by-`1` bivariate state vector Xt

Data Types: `double` | `function_handle`

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

If you specify `JumpMean` as an array, it must be a scalar.

If you specify `JumpMean` as a deterministic function of time, you call `JumpMean` with a real-valued scalar time `t` as its only input, it must return a scalar.

If you specify `JumpMean` as a function of time and state, `JumpMean` must return a scalar when you call it with two inputs:

• A real-valued scalar observation time t

• A `2`-by-`1` bivariate state vector Xt

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 specify `JumpVol` as an array, it must be a scalar.

If you specify `JumpVol` as a deterministic function of time, you call `JumpVol` with a real-valued scalar time `t` as its only input, it must return a scalar.

If you specify `JumpVol` as a function of time and state, `JumpVol` must return a scalar when you call it with two inputs:

• A real-valued scalar observation time t

• A `2`-by-`1` bivariate state vector Xt

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.

If `StartState` is a scalar, `bates` applies the same initial value to all state variables on all trials.

If `StartState` is a bivariate column vector, `bates` applies a unique initial value to each state variable on all trials.

If `StartState` is a matrix, `bates` applies 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, a `2`-by-`2` positive semidefinite matrix, or as a deterministic function Ct that accepts the current time t and returns an `2`-by-`2` positive semidefinite correlation matrix. If `Correlation` is not a symmetric positive semidefinite matrix, use `nearcorr` to create a positive semidefinite matrix for a correlation matrix.

A `Correlation` matrix represents a static condition.

If you specify `Correlation` as a deterministic function of time, `Correlation` allows you to specify a dynamic correlation structure.

Data Types: `double`

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 of `NVars` state variables driven by `NBrowns` Brownian motion sources of risk over `NPeriods` consecutive observation periods, approximating continuous-time stochastic processes.

Use the `drift` function to create `drift` objects of the form

`$F\left(t,{X}_{t}\right)=A\left(t\right)+B\left(t\right){X}_{t}$`

Here:

• `A` is an `NVars`-by-`1` vector-valued function accessible by the (t, Xt) interface.

• `B` is an `NVars`-by-`NVars` matrix-valued function accessible by the (t, Xt) interface.

The displayed parameters for a `drift` object follow.

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

• `A` — Intercept term, A(t,Xt), of F(t,Xt)

• `B` — First-order term, B(t,Xt), of F(t,Xt)

`A` and `B` enable you to query the original inputs. The function stored in `Rate` fully encapsulates the combined effect of `A` and `B`.

Specifying `A``B` as MATLAB double arrays clearly associates them with a linear drift rate parametric form. However, specifying either `A` or `B` as a function allows you to customize virtually any drift-rate specification.

Note

You can express `drift` and `diffusion` objects in the most general form to emphasize the functional (t, Xt) interface. However, you can specify the components `A` and `B` as 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`

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

The diffusion-rate specification supports the simulation of sample paths of `NVars` state variables driven by `NBrowns` Brownian motion sources of risk over `NPeriods` consecutive observation periods for approximating continuous-time stochastic processes.

Use the `diffusion` function to create `diffusion` objects of the form

`$G\left(t,{X}_{t}\right)=D\left(t,{X}_{t}^{\alpha \left(t\right)}\right)V\left(t\right)$`

Here:

• `D` is an `NVars`-by-`NVars` diagonal matrix-valued function.

• Each diagonal element of `D` is the corresponding element of the state vector raised to the corresponding element of an exponent `Alpha`, which is an `NVars`-by-`1` vector-valued function.

• `V` is an `NVars`-by-`NBrowns` matrix-valued volatility rate function `Sigma`.

• `Alpha` and `Sigma` are also accessible using the (t, Xt) interface.

The displayed parameters for a `diffusion` object are:

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

• `Alpha` — State vector exponent, which determines the format of D(t,Xt) of G(t,Xt)

• `Sigma` — Volatility rate, V(t,Xt), of G(t,Xt)

`Alpha` and `Sigma` enable you to query the original inputs. (The combined effect of the individual `Alpha` and `Sigma` parameters is fully encapsulated by the function stored in `Rate`.) The `Rate` functions are the calculation engines for the `drift` and `diffusion` objects, and are the only parameters required for simulation.

Note

You can express `drift` and `diffusion` objects in the most general form to emphasize the functional (t, Xt) interface. However, you can specify the components `A` and `B` as 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` Simulate `Bates` sample paths by Euler approximation `simByQuadExp` Simulate `Bates`, `Heston`, and `CIR` sample paths by quadratic-exponential discretization scheme `simulate` Simulate multivariate stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, `SDEMRD`, `Merton`, or `Bates` models `simByTransition` Simulate `Bates` sample paths with transition density

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 over `NPeriods` consecutive observation periods. The simulation approximates continuous-time Bates stochastic volatility processes.

Create a `bates` object.

```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 = Class BATES: Bates Bivariate Stochastic 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 ```

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

`$\begin{array}{l}d{S}_{t}=\left(\gamma -q-{\lambda }_{p}{\mu }_{j}\right){S}_{t}dt+\sqrt{{\upsilon }_{t}}{S}_{t}d{W}_{t}+J{S}_{t}d{P}_{t}\\ d{\upsilon }_{t}=\kappa \left(\theta -{\upsilon }_{t}\right)dt+{\sigma }_{\upsilon }\sqrt{{\upsilon }_{t}}d{W}_{t}^{\upsilon }\\ \text{E}\left[d{W}_{t}d{W}_{t}^{\upsilon }\right]=pdt\\ \text{prob}\left(d{P}_{t}=1\right)={\lambda }_{p}dt\end{array}$`

Here:

ᵞ is the continuous risk-free rate.

q is the continuous dividend yield.

J is the random percentage jump size conditional on the jump occurring, where

`$\mathrm{ln}\left(1+J\right)~N\left(\text{ln(1+}{u}_{j}\right)-\frac{{\delta }^{2}}{2},{\delta }^{2}$`

(1+J) has a lognormal distribution:

`$\frac{1}{\left(1+J\right)\delta \sqrt{2\pi }}\text{exp}\left\{\frac{-{\left[\mathrm{ln}\left(1+J\right)-\left(\text{ln(1+}{\mu }_{j}\right)-\frac{{\delta }^{2}}{2}\right]}^{2}}{2{\delta }^{2}}\right\}$`

Here:

μj is the mean of Jj > -1).

ƛp is the annual frequency (intensity) of the Poisson process Ptp ≥ 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).

p is the correlation between the Weiner processes Wt and Wtυ (-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 Studies 9, no. 2 ( Apr. 1996): 385–426.

[2] Aït-Sahalia, Yacine. “Transition Densities for Interest Rate and Other Nonlinear Diffusions.” The Journal of Finance 54, 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