Heston1D

Heston1D simulates observations and instantaneous variances from the Heston model

Syntax

Description

Heston1D simulates, using the Euler–Maruyama method, observations and instantaneous variances from the model by [S. Heston, The Review of Financial Studies, Vol. 6, No. 2, 1993].

example

x =Heston1D(T, n, parameters, rho, x0, V0) Example of call of Heston1D for obtaining process observations only.

example

[x, V] =Heston1D(___) Example of call of Heston1D for obtaning process observations and volatility values.

example

[x, V, t] =Heston1D(___) Example of call of Heston1D for obtaning process observations, volatility values and sampling times.

Examples

expand all

  • Example of call of Heston1D for obtaining process observations only.
  • Generates observations from the Heston model.

    T=1;  
    n=23400;   
    parameters=[0,0.4,2,1];
    rho=-0.5;
    x0=log(100); 
    V0=0.4;
    x = Heston1D(T,n,parameters,rho,x0,V0);  
    figure
    plot(x)
    ylabel('Observations')
    title('Heston model')
    Click here for the graphical output of this example (link to Ro.S.A. website).

  • Example of call of Heston1D for obtaning process observations and volatility values.
  • Generates observations and volatilities from the Heston model.

    T=1; 
    n=23400; 
    parameters=[0,0.4,2,1];
    rho=-0.5;
    x0=log(100); 
    V0=0.4;
    [x,V] = Heston1D(T,n,parameters,rho,x0,V0);  
    figure
    subplot(2,1,1)
    plot(x)
    ylabel('Observations')
    title('Heston model')
    subplot(2,1,2)
    plot(V)
    ylabel('Spot Variances')
    title('Heston model')
    Click here for the graphical output of this example (link to Ro.S.A. website).

  • Example of call of Heston1D for obtaning process observations, volatility values and sampling times.
  • Generates observations, volatilities and sampling times from the Heston model.

    T=1; 
    n=23400; 
    parameters=[0,0.4,2,1];
    rho=-0.5;
    x0=log(100); 
    V0=0.4;
    [x,V,t] = Heston1D(T,n,parameters,rho,x0,V0);  
    figure
    subplot(2,1,1)
    plot(t,x)
    xlabel('Time')
    ylabel('Observations')
    title('Heston model')
    subplot(2,1,2)
    plot(t,V)
    xlabel('Time')
    ylabel('Spot Variances')
    title('Heston model')
    Click here for the graphical output of this example (link to Ro.S.A. website).

    Input Arguments

    expand all

    T — Time horizon. Scalar.

    Data Types: single| double

    n — Number of simulated observation. Scalar.

    Data Types: single| double

    parameters — Model parameters. Vector.

    Vector of dimension 4.

    Data Types: single| double

    rho — Leverage parameter. Scalar.

    Data Types: single| double

    x0 — Initial observation value. Scalar.

    Data Types: single| double

    V0 — Initial variance value. Scalar.

    Data Types: single| double

    Output Arguments

    expand all

    x —Process observations. Vector

    Vector of dimension n+1.

    V —Spot variance values. Vector

    Vector of dimension n+1.

    t —Observation times. Vector

    Vector of dimension n+1.

    More About

    expand all

    Additional Details

    The Heston model [S. Heston, The Review of Financial Studies, Vol. 6, No. 2, 1993] is given by the following stochastic differential equations: $$\left\{\begin{array}{l} dx_t=\left( \mu-\frac{1}{2} \sigma^2_t \right) \, dt + \sigma_t \, dW_t \\ d\sigma^2_t=\theta \, \left( \alpha-\sigma^2_t \right) \, dt + \gamma \, \sigma_t \, dZ_t \end{array}\right. ,$$ where $\mu$ is a real-valued constant, $\theta, \, \alpha$ and $\gamma$ are positive constants, and $W$ and $Z$ are Brownian motions with correlation $\rho$.

    References

    Heston, S. (1993), A closed-form solution for options with stochastic volatility with applications to bond and currency options, The Review of Financial Studies, Vol. 6, No. 2.

    See Also

    This page has been automatically generated by our routine publishFS