FM_int_cov

FM_int_cov computes the integrated covariance of a bivariate diffusion process via the Fourier-Malliavin estimator

Syntax

  • C_int=FM_int_cov(x1,x2,t1,t2,T)example
  • C_int=FM_int_cov(x1,x2,t1,t2,T,Name,Value)example

Description

example

C_int =FM_int_cov(x1, x2, t1, t2, T) Example of call of FM_int_cov with default value of N.

example

C_int =FM_int_cov(x1, x2, t1, t2, T, Name, Value) Example of call of FM_int_cov with custom choice of N.

Examples

expand all

  • Example of call of FM_int_cov with default value of N.
  • The following example estimates the daily integrated covariance of a bivariate Heston model from a discrete sample. The Heston model assumes that the spot variance follows a Cox-Ingersoll-Ross model.

    % Heston model simulation
    T=1; 
    n=23400; 
    parameters=[0,0;0.4,0.4;2,2;1,1];
    Rho=[0.5,-0.5,0,0,-0.5,0.5];
    x0=[log(100); log(100)]; 
    V0=[0.4; 0.4];
    [x,V,t]=Heston2D(T,n,parameters,Rho,x0,V0); 
    % Integrated covariance estimation 
    t1=t; 
    t2=t;
    C_int=FM_int_cov(x(:,1),x(:,2),t1,t2,T);

  • Example of call of FM_int_cov with custom choice of N.
  • The following example estimates the integrated covariance of a bivariate Heston model from a discrete sample. The Heston model assumes that the spot variance follows a Cox-Ingersoll-Ross model.

    % Heston model simulation
    T=1; % horizon of the trajectory (in days)
    n=23400; % number of observations simulated in one trajectory 
    parameters=[0 , 0; 0.4 , 0.4; 2 , 2; 1 , 1 ];
    Rho=[0.5 ; -0.5 ; 0 ; 0 ; -0.5 ; 0.5];
    x0=[log(100); log(100)]; V0=[0.4; 0.4];
    [x,V,t] = Heston2D(T,n,parameters,Rho,x0,V0); 
    % Integrated covariance estimation 
    t1=t; 
    t2=t;
    C_int=FM_int_cov(x(:,1),x(:,2),t1,t2,T,'N',5000);

    Input Arguments

    expand all

    x1 — Observation values of process 1. Vector.

    Row or column vector containing the observed values.

    Data Types: single| double

    x2 — Observation values of process 2. Vector.

    Row or column vector containing the observed values.

    Data Types: single| double

    t1 — Observation times of process 1. Vector.

    Row or column vector containing the observation times.

    Data Types: single| double

    t2 — Observation times of process 2. Vector.

    Row or column vector containing the observation times.

    Data Types: single| double

    T — Estimation horizon. Scalar.

    Data Types: single| 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: 'N',400

    N —Cutting frequency.scalar.

    If N is not specified, it is set equal to floor((min(length(x1),length(x2))-1)/2).

    Example: 'N',400

    Data Types: single | double

    Output Arguments

    expand all

    C_int —Integrated covariance of processes 1 and 2 on [0,T]. Scalar

    Value of the integrated covariance of processes 1 and 2.

    More About

    expand all

    Additional Details

    We assume that vectors x1 and x2 contain discrete observations from a bivariate diffusion process $(x_1,x_2)$ following the Ito stochastic differential equation $$dx_i(t)= \sigma_i(t) \ dW_i(t) + b_i(t) \ dt, \quad i=1,2,$$ where $W_1$ and $W_2$ are two Brownian motions defined on the filtered probability space $(\Omega, (\mathcal{F}_t)_{t \in [0,T]}, P)$, with correlation $\rho$, while $\sigma_1, \sigma_2, b_1$ and $b_2$ are random processes, adapted to $\mathcal{F}_t$.

    See the References for further mathematical details.

    The integrated covariance of the process $(x_1,x_2)$ on $[0,T]$ is defined as $$IC_{[0,T]}:=\rho \, \int_0^T \sigma_1(t) \sigma_2(t) \, dt$$ Let $i=1,2$. For any positive integer $n_i$, let $\mathcal{S}^i_{n_i}:=\{ 0=t^i_{0}\leq \cdots \leq t^i_{n_i}=T \}$ be the observation times for the $i$-th asset. Moreover, let $\delta_l(x^i):= x^i(t^i_{l+1})-x^i(t^i_l)$ be the increments of $x^i$.

    The Fourier estimator of the integrated covariance on $[0,T]$ is given by $$T c_0(c_{n_1,n_2,N})={T\over {2N+1}} \sum_{|k|\leq N} c_{k}(dx^1_{n_1})c_{-k}(dx^2_{n_2}),$$ $$c_k(dx^i_{n_i})= {1\over {T}} \sum_{l=0}^{n_i-1} e^{-{\rm i}\frac{2\pi}{T}kt^i_l}\delta_{l}(x_i).$$

    References

    Mancino, M.E., Recchioni, M.C., Sanfelici, S. (2017), Fourier-Malliavin Volatility Estimation. Theory and Practice, "Springer Briefs in Quantitative Finance", Springer.

    Sanfelici, S., Toscano, G. (2024), The Fourier-Malliavin Volatility (FMVol) MATLAB toolbox, available on ArXiv.

    This page has been automatically generated by our routine publishFS