Ornstein-Uhlenbeck Process

Overview

Ornstein-Uhlenbeck process is a stochastic process which uses the Random Number Generator (RNG) to generate locations for mesher. It uses a reference time point Δw and a time step Δt to calculate the drift and diffusion. The Ornstein-Uhlenbeck process is a simple stochastic processes, whose feature of interest is its mean-reverting drift term a(rx) and its constant diffusion term σ.

The Ornstein-Uhlenbeck process can be described by

dx=a(rxt)dt+σdWt

Implementation

The implementation of OrnsteinUhlenbeckProcess contains a few methods. The implementation can be introduced as follows:

  1. init: The initialization process to set up arguments as below:

    a)speed, the spreads on interest rates;

    b)vola, the overall level of volatility;

    c)x0, the initial value of level;

    d)level, the width of fluctuation on interest rates.

  2. expectation: The expectation method returns the expectation of the process at time E(xt0+Δt|xt0=x0).

  3. stdDeviation: The stdDeviation method returns the standard deviation S(xt0+Δt|xt0=x0) of the process with a time period Δt according to the given discretization.

  4. variance: The variance method returns the variance V(xt0+Δt|xt0=x0) of the process with a time period Δt according to the given discretization.

  5. evolve: The evolve method returns the asset value after a time interval Δt according to the given discretization. It returns,

E(x0,t0,Δt)+S(x0,t0,Δt)Δw

where E is the expectation and S the standard deviation.