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)
2Ito's Lemma — The Chain Rule of Stochastic Calculus
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
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.