Brownian Motion and Random Walk Models › Connecting GBM to Real Market Data
Michael BrenndoerferNovember 22, 20252 min read
Quantitative FinanceAll chapters Part 5 of 15Stochastic Calculus and Pricing Theory
Brownian Motion and Random Walk Models › Connecting GBM to Real Market DataOne section · Sections in this chapter6 / 10 ↓
Sections in this chapter10
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
How well does GBM describe actual stock prices? Let's compare simulated GBM paths against real market behavior using the stylized facts from the previous chapter.
We'll calibrate GBM parameters from historical data and examine where the model succeeds and fails.
In[28]:
Codeimport numpy as np
# Load S&P 500 data (using yfinance for demonstration)
# In practice, you'd have historical data available
np.random.seed(42)
# Simulate "historical" data that mimics S&P 500 characteristics
# Annual return ~10%, volatility ~16%
n_days = 252 * 10 # 10 years of daily data
true_mu = 0.10
true_sigma = 0.16
_, historical_sim = gbm_exact(
100, true_mu, true_sigma, T=10, n_steps=n_days, n_paths=1
)
historical_prices = historical_sim[0]
# Calculate daily log returns
log_returns = np.diff(np.log(historical_prices))
# Estimate GBM parameters
dt = 1 / 252
estimated_mu = log_returns.mean() / dt + (log_returns.std() ** 2 / dt) / 2
estimated_sigma = log_returns.std() / np.sqrt(dt)Out[29]:
ConsoleGBM Parameter Estimation from 10 Years of Data: ================================================== Parameter True Estimated -------------------------------------------------- Drift (μ) 0.1000 0.1832 Volatility (σ) 0.1600 0.1574
The parameter estimation works well when data truly comes from GBM. But real markets deviate from GBM assumptions in systematic ways.