Random walk

Introduction

A random walk is a stochastic process which describes a path made of consecutive random steps.

Gaussian

In Gaussian random walk the steps follow a continuous Gaussian distribution. We will look at two different types, the univariate and multivariate kind.

Univariate

A univariate Gaussian Random Walk, is a series of i.i.d. $\mathcal{N}(0,1)$ random variables such that

$$ \begin{align*} X_0&=0 \ X_t&=X_{t−1}+\epsilon_t \end{align*} $$

Where $t=1,2,\dots$ and $\epsilon_t$ is a series of i.i.d. $\mathcal{N}(0,1)$ random variables.

Let’s illustrate a simple univariate Gaussian random walk in Python, by plotting 1000 realisations.

import numpy as np
N = 1000
np.random.seed(23)
realisations = []
for i in range(N):
    realisations.append(np.cumsum(np.random.normal(size=100)))
import matplotlib.pyplot as plt
from plotutils import *
for i in range(N):
    plt.plot(realisations[i], c="k", alpha=0.1)
plt.title("Univariate Gaussian random walk")
plt.xlabel("t")
plt.ylabel("$x_t$")
plt.show()