← Back to Learn
IV ExpertWeek 25 • Lesson 72Duration: 45 min

INT Stochastic Calculus Essentials

Ito's Lemma, Brownian motion, and the mathematics beneath all of quantitative finance

Learning Objectives

  • Understand Brownian motion and its properties
  • Learn Ito's Lemma and why it differs from standard calculus
  • See how stochastic calculus connects everything in quant finance

Explain Like I'm 5

Stochastic calculus is calculus for random processes. Normal calculus works for smooth, predictable functions. But stock prices are RANDOM — they jiggle unpredictably. Stochastic calculus handles this randomness mathematically. Ito's Lemma is the chain rule for random processes. It's the foundation of EVERYTHING in quantitative finance — Black-Scholes, Monte Carlo, rate models, all of it.

Think of It This Way

Regular calculus is like driving on a smooth highway — you can predict exactly where you'll be in 10 minutes. Stochastic calculus is like driving through an earthquake — the road keeps shifting randomly. You can't predict your exact position, but you CAN compute the PROBABILITY of being at various positions. That's what stochastic calculus does.

1Brownian Motion (Wiener Process)

Brownian motion WtW_t is the mathematical model of randomness in finance: Properties: - W0=0W_0 = 0 - Increments are normal: Wt+sWtN(0,s)W_{t+s} - W_t \sim N(0, s) - Increments are independent - Continuous but NOWHERE differentiable (infinitely jagged) The last property is key: you can't take a standard derivative of WtW_t. Standard calculus breaks down. Ito developed special calculus rules to handle this. Geometric Brownian motion (GBM) for stock prices:
dS=μSdt+σSdWdS = \mu S\,dt + \sigma S\,dW
This says: stock returns = drift (μdt\mu\,dt) + random noise (σdW\sigma\,dW). This model underlies Black-Scholes, Monte Carlo simulation, and most standard quant models. Is GBM realistic? Partially: - [PASS] Returns are roughly proportional to price (percentage returns) - [PASS] Randomness is continuous (no teleportation) - [FAIL] Returns are NOT normally distributed (fat tails) - [FAIL] Volatility is NOT constant (vol clustering) - [FAIL] Jumps DO happen (gaps, flash crashes) GBM is wrong but useful — like Newtonian physics.

2Ito's Lemma — The Chain Rule of Stochastic Calculus

In regular calculus, if f(x)f(x) is a function and xx changes, the chain rule gives: df=f(x)dxdf = f'(x)\,dx In stochastic calculus, there's an EXTRA TERM:
df=f(S)dS+12f(S)(dS)2df = f'(S)\,dS + \tfrac{1}{2}f''(S)(dS)^2
Why the extra term? Because (dW)2=dt(dW)^2 = dt (not 0). The variance of Brownian motion increments accumulates. Applying Ito's Lemma to f(S)=ln(S)f(S) = \ln(S) with dS=μSdt+σSdWdS = \mu S\,dt + \sigma S\,dW:
d(lnS)=(μσ2/2)dt+σdWd(\ln S) = (\mu - \sigma^2/2)\,dt + \sigma\,dW
The σ2/2-\sigma^2/2 correction is Ito's signature result. It explains: - Log returns have drift μσ2/2\mu - \sigma^2/2, not μ\mu - Higher volatility reduces the drift of log prices - This is the "volatility drag" that long-term investors experience This single result derives the GBM solution, the Black-Scholes PDE, risk-neutral pricing, and essentially everything else in quantitative finance.

Key Formulas

Ito's Lemma

The chain rule for stochastic processes. The extra (1/2)f''(dS)^2 term is what makes stochastic calculus different from regular calculus. It arises because (dW)^2 = dt.

GBM Solution

The analytical solution to geometric Brownian motion, derived using Ito's Lemma. The -sigma^2/2 term is the Ito correction (volatility drag).

Hands-On Code

Verifying Ito's Lemma Numerically

python
import numpy as np

def verify_ito(S0=100, mu=0.10, sigma=0.20, T=1.0, n_steps=10000, n_sims=100000):
    """Numerically verify Ito's Lemma: E[ln(S_T)] = ln(S_0) + (mu - sigma^2/2)T"""
    dt = T / n_steps
    
    # Simulate GBM paths
    S = np.full(n_sims, S0, dtype=float)
    for _ in range(n_steps):
        Z = np.random.standard_normal(n_sims)
        S *= np.exp((mu - sigma**2/2)*dt + sigma*np.sqrt(dt)*Z)
    
    # Compare
    empirical_mean_log = np.mean(np.log(S))
    theoretical_mean_log = np.log(S0) + (mu - sigma**2/2) * T
    
    print(f"=== ITO'S LEMMA VERIFICATION ===")
    print(f"Parameters: mu={mu}, sigma={sigma}, T={T}")
    print(f"")
    print(f"E[ln(S_T)]:")
    print(f"  Theoretical (Ito): {theoretical_mean_log:.6f}")
    print(f"  Simulated:         {empirical_mean_log:.6f}")
    print(f"  Error:             {abs(theoretical_mean_log - empirical_mean_log):.6f}")
    print(f"")
    print(f"WITHOUT Ito correction:")
    wrong = np.log(S0) + mu * T
    print(f"  Naive (no -sigma^2/2):  {wrong:.6f}")
    print(f"  This is WRONG by:  {abs(wrong - empirical_mean_log):.6f}")
    print(f"")
    print(f"The sigma^2/2 = {sigma**2/2:.4f} correction matters!")

# verify_ito()

Numerically verifies Ito's Lemma by simulating GBM paths and comparing the mean log return to the theoretical prediction, demonstrating the sigma^2/2 correction.

Knowledge Check

Q1.In Ito calculus, (dW)^2 equals:

Assignment

Verify Ito's Lemma numerically: simulate 100K GBM paths and compare E[ln(S_T)] to the theoretical ln(S_0) + (mu - sigma^2/2)T. Then try WITHOUT the sigma^2/2 correction and observe the error.