Random Walk vs Martingale
Finance students often encounter both random walks and martingales in their studies. At first sight, the two concepts look almost the same : both can be applied to describe the process, that “do not drift on average”. But both concepts are not identical. Understanding the distinction is crucial.
Get Quants Quest’s stories in your inbox
Join Medium for free to get updates from this writer.
In this article, we’ll clarify the concepts, illustrate them with Python simulations, and explain why the distinction matters in finance.
What is a Random Walk in Finance?
A random walk is one of the simplest stochastic processes. In discrete time, it is defined as:
where ϵt+1 are independent and identically distributed (i.i.d.) shocks, often assumed to be Gaussian with mean zero and variance σ2. The noise distribution can however take different for, including distribution with heavy tails.
Intuition
At each step, the process moves up or down randomly, with no predictable trend. The past brings no information to the future.
Financial interpretation
If stock prices followed a random walk, tomorrow’s price would equal today’s price plus a random shock. This aligns with the Efficient Market Hypothesis : if markets are efficient, new information arrives randomly, and so do price changes.
Python example
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(42)
N, T = 20, 252
eps = np.random.normal(0, 1, (T, N))
X = np.cumsum(eps, axis=0) # random walk
plt.plot(X)
plt.title("Random Walk Simulations")
plt.show()What is a Random Walk in Stock Prices?
A martingale is defined in probability theory as a process Xt such that:
where Ft is the information available up to time t.
Intuition
The conditional expectation of tomorrow’s value, given today’s information, is just today’s value. In other words, knowing the past gives you no edge in predicting the future.
Key difference from random walk
A martingale is defined by a conditional expectation property under a probability measure, when a random walk is a model of the behavior of Xt. This makes the martingale a far more general concept.
Financial Interpretation: The Role of the SDF and Change of Measure
Under the real-world probability measure P, a stock price is generally not a martingale due to the presence of risk premia — investors demand compensation for bearing risk. However, in risk-neutral pricing, we use a different probability measure, called the risk-neutral measure Q, under which discounted asset prices become martingales. This makes the concept universal. For a complete explanation, feel free to check my post.
Conclusion
Random walks and martingales may seem similar at first glance, but the distinction is subtle and important. Random walks describe how prices move step by step, while martingales capture a broader property of fair game conditional expectations. Understanding both is fundamental to quantitative finance, stochastic modeling, and financial mathematics.







