Recipe for simulating the fractional Brownian motion (fBM) process in discrete time for any Hurst parameter \( H \in (0,1) \).
Fractional Brownian motion (fBM) is a generalization of Brownian motion with parameter \( H \in (0,1) \) (the Hurst parameter) that controls the roughness and memory of the process. Its covariance kernel is $$ K(s, t) = \frac{1}{2} \left( s^{2H} + t^{2H} - |s-t|^{2H} \right) $$ For \( H = 1/2 \), this reduces to standard Brownian motion. For \( H > 1/2 \), increments are positively correlated (persistent), and for \( H < 1/2 \), increments are negatively correlated (anti-persistent).
import numpy as np
def fbm_discrete(steps=100, H=0.5, paths=1, T=1):
t = np.linspace(0, T, steps)
Gamma = np.zeros((steps, steps))
for i in range(steps):
for j in range(steps):
Gamma[i, j] = 0.5 * (t[i]**(2*H) + t[j]**(2*H) - abs(t[i]-t[j])**(2*H))
L = np.linalg.cholesky(Gamma + 1e-10*np.eye(steps))
Z = np.random.normal(0, 1, (steps, paths))
X = L @ Z
return X.T, t
Summary: This approach produces fBM sample paths with the correct covariance structure by constructing the covariance matrix and using Cholesky decomposition.
import numpy as np\n\ndef fbm_discrete(steps=100, H=0.5, paths=1):\n t = np.linspace(0, 1, steps)\n Gamma = np.zeros((steps, steps))\n for i in range(steps):\n for j in range(steps):\n Gamma[i, j] = 0.5 * (t[i]**(2*H) + t[j]**(2*H) - abs(t[i]-t[j])**(2*H))\n L = np.linalg.cholesky(Gamma + 1e-10*np.eye(steps))\n Z = np.random.normal(0, 1, (steps, paths))\n X = L @ Z\n return X.T, t
This note discusses the necessary steps to simulate a stochastic process with a desired covariance structure. In this context, I outline the Karhunen–Loéve theorem and provide intuition and general recipes to decompose a stochastic process by establishing the integral eigenvalue problem (continuous-time) or, equivalently, the covariance matrix diagonalization problem (discrete-time). I then apply these general recipes to Brownian motion, Brownian bridge, and fractional Brownian motion to numerically simulate paths.