Phase 18 - Lesson 18.3

Capstone 3 - Stochastic Calculus and Derivative Pricing

From Itô’s lemma and GBM to Black–Scholes and risk-neutral pricing - then confirm the closed form with a Monte Carlo estimate.

⏱ 130 min● Advanced🔗 Prereqs: Phases 9, 13, 14
↖ Phase 18 hub
Builds on: Integrates Stochastic Calculus (Phase 9), Monte Carlo (Phase 13), and Mathematical Finance (Phase 14).
Leads to: The pricing engine and risk-neutral discipline here feed the volatility capstone (18.4) and the HFT sims.

Learning Objectives

Click a status chip to cycle: Not started → In progress → Studied → Practiced → Needs review → Mastered.

Key Vocabulary

Itô’s lemma
The chain rule for Itô processes: \(df=f_t\,dt+f_x\,dX+\tfrac12 f_{xx}\,d\langle X\rangle\), with the extra second-order term.
Geometric Brownian motion
The asset model \(dS=\mu S\,dt+\sigma S\,dW\), solving to a lognormal \(S_t\).
Risk-neutral measure
An equivalent measure \(\Q\) under which discounted asset prices are martingales; drift becomes \(r\).
Black–Scholes formula
Closed-form European option price under GBM with constant \(\sigma\) and \(r\).
Greeks
Sensitivities of price to inputs: delta \(\partial V/\partial S\), gamma, vega, theta, rho.
Martingale
A process whose conditional expected future value equals its current value; the mathematical form of ‘no arbitrage’.

Intuition & Motivation

Intuition
Derivative pricing is one clean idea executed carefully: model the asset as geometric Brownian motion, use Itô’s lemma to handle functions of it, switch to the risk-neutral measure where discounted prices are martingales, and price a claim as the discounted expected payoff. Black–Scholes is the closed-form answer for a European call; Monte Carlo is the general-purpose answer - and the two must agree, which is your validation.

The subtle, honest point: risk-neutral pricing does not say the stock actually drifts at \(r\). It says that, for the purpose of pricing by replication and no-arbitrage, we compute expectations under a measure where it does. Confusing this with a real-world forecast is the deepest conceptual error in the field.

The brief

Implement a European option pricer two ways - the Black–Scholes closed form and a risk-neutral Monte Carlo estimator - and show they agree within Monte Carlo standard error across a grid of strikes. Deliverable: code, a reconciliation table, and a short note on why the drift is \(r\), not \(\mu\).

Required theory recap

Itô’s lemma and the log transform

Because \(W\) has nonzero quadratic variation (Capstone 2), the chain rule gains a second-order term. Applying it to \(\log S\) removes the state-dependence and yields constant-coefficient dynamics:

\[d\log S=\Big(\mu-\tfrac12\sigma^2\Big)dt+\sigma\,dW \;\Rightarrow\; S_T=S_0\,e^{(\mu-\frac12\sigma^2)T+\sigma W_T}.\] (18.6)

Risk-neutral pricing and Black–Scholes

Under the risk-neutral measure \(\Q\) the drift is the risk-free rate \(r\). The price of a European claim is the discounted risk-neutral expected payoff:

\[V_0=e^{-rT}\,\E^{\Q}\!\big[\text{payoff}(S_T)\big],\qquad S_T=S_0 e^{(r-\frac12\sigma^2)T+\sigma\sqrt T\,Z}.\] (18.7)

For a call this integral has the closed form

\[C=S_0\Phi(d_1)-Ke^{-rT}\Phi(d_2),\quad d_{1,2}=\frac{\log(S_0/K)+(r\pm\frac12\sigma^2)T}{\sigma\sqrt T}.\] (18.8)
Worked Example - Reconciling Black–Scholes with Monte Carlo
1
Closed form: evaluate (18.8) at \(S_0=100,K=100,r=0.03,\sigma=0.2,T=1\) → \(C\approx9.41\).
2
Monte Carlo: draw \(N\) risk-neutral terminals \(S_T=S_0e^{(r-\sigma^2/2)T+\sigma\sqrt T Z}\), average \(e^{-rT}\max(S_T-K,0)\).
3
The MC estimate has SE \(\approx\hat s/\sqrt N\); with \(N=10^5\) it is a few cents.
4
Validation: \(|C_{\text{MC}}-C_{\text{BS}}|\lt 2\times\text{SE}\) should hold. If not, the drift (used \(\mu\) instead of \(r\)?), the discounting, or the \(d_1/d_2\) are wrong.
5
This cross-check is exactly the oracle test of 17.2, with the closed form as the oracle.

Why the drift is r, not μ

Under replication, the option payoff can be hedged with the stock and the bond; no-arbitrage forces the price to equal the cost of the replicating portfolio, which depends on \(r\) and \(\sigma\) but not on the real-world drift \(\mu\). Equivalently, discounted prices are \(\Q\)-martingales. This is a pricing statement, not a prediction that stocks earn \(r\).

Key Idea
Risk-neutral pricing prices relative to the hedge, so \(\mu\) cancels. The real-world drift still matters for risk and P&L forecasting (Capstone 5) - just not for the arbitrage-free price of the derivative.
▶ Reference architecture for the pricer
price/bs.py -> bs_call/bs_put(S,K,r,sigma,T); greeks(...) price/mc.py -> mc_call(S,K,r,sigma,T,N,seed) -> (price, se) price/check.py-> reconcile: |mc - bs| < 3*se across a strike grid

The BS module is the oracle; the MC module is the general engine; the check module enforces agreement within standard error - a reproducible, seeded test (17.2–17.3).

Common Mistakes to Avoid
  • Simulating the terminal with the real-world drift \(\mu\) instead of \(r\) for pricing - you price the wrong thing.
  • Dropping the \(-\tfrac12\sigma^2\) Itô correction in the exponent, biasing \(S_T\) upward.
  • Comparing MC to BS without a standard error and calling a within-noise gap a ‘bug’.
  • Believing risk-neutral pricing forecasts that the stock grows at \(r\) - it does not.
  • Forgetting to discount by \(e^{-rT}\), or discounting twice.
  • Using too few paths and reporting three decimals of false precision.
Quant Practitioner Tips
  • Price with the risk-neutral terminal \(S_0e^{(r-\sigma^2/2)T+\sigma\sqrt T Z}\); keep \(\mu\) out of the pricer entirely.
  • Validate every Monte Carlo price against a closed form where one exists; treat BS as the oracle.
  • Report price \(\pm1.96\,\text{SE}\); use antithetic or control variates to shrink SE cheaply (Phase 13).
  • Sanity-check Greeks by finite-differencing the price (ties back to Capstone 1).
  • State explicitly, in any writeup, that risk-neutral is a pricing device, not a forecast.

Interactive: Black–Scholes vs. risk-neutral Monte Carlo

Implement both pricers and the reconciliation check; the tests require agreement within a few standard errors.

Knowledge Check

Q1 Medium
Applying Itô’s lemma to \(\log S\) under \(dS=\mu S\,dt+\sigma S\,dW\) gives a drift of:
\(\mu\)
\(\mu-\tfrac12\sigma^2\)
\(r\)
\(\mu+\tfrac12\sigma^2\)
Q2 Medium
For pricing a European option by Monte Carlo, the simulated terminal should use drift:
\(\mu\) (real-world)
\(r\) (risk-free, risk-neutral)
\(\mu-r\)
zero
Q3 Hard
‘Risk-neutral pricing sets the drift to \(r\)’ means:
The stock is forecast to grow at \(r\)
For pricing by no-arbitrage/replication we take expectations under a measure where the drift is \(r\); it is not a real-world forecast
Investors are indifferent to risk in reality
The formula is only approximate

Practical Exercise

A colleague’s Monte Carlo call price is consistently ~8% above your Black–Scholes value and does not converge to it as \(N\) grows. (a) List the three most likely bugs, in order. (b) Describe the single diagnostic that isolates the drift bug from the discounting bug. (c) State the validation criterion that should have caught this before it shipped.

▶ Show full solution

(a) Most likely, in order: (1) simulating with the real-world drift \(\mu\gt r\) instead of \(r\) (systematic upward bias that does not vanish with \(N\)); (2) dropping the \(-\tfrac12\sigma^2\) Itô correction, biasing \(S_T\) up; (3) a discounting error (missing or mis-signed \(e^{-rT}\)).

(b) Diagnostic: check \(\E^{\Q}[S_T]\) from the simulation. It should equal the forward \(S_0e^{rT}\). If the simulated mean terminal is \(S_0e^{\mu T}\) instead, the drift is wrong; if the mean terminal is correct but the price is off by a constant factor, the discounting is wrong.

(c) The reconciliation test: \(|C_{\text{MC}}-C_{\text{BS}}|\lt 3\,\text{SE}\) across a strike grid. A bias that persists as \(N\) grows (SE shrinks but the gap doesn’t) fails this test decisively - exactly the oracle check from 17.2.

After the reveal, answer for yourself: Why does a drift bug fail to disappear as \(N\) grows, while pure Monte Carlo noise does?

Lesson Summary

Derivative pricing chains four ideas: model \(S\) as GBM, use Itô’s lemma (the \(-\tfrac12\sigma^2\) term from nonzero quadratic variation), price under the risk-neutral measure \(V_0=e^{-rT}\E^{\Q}[\text{payoff}]\) with drift \(r\), and get Black–Scholes in closed form. A risk-neutral Monte Carlo estimator must reconcile with the closed form within standard error - the validation. Risk-neutral pricing is a no-arbitrage device, not a forecast that stocks earn \(r\).

Retrieval Practice

Close the lesson and answer from memory before checking. This is deliberate, effortful recall - the single highest-yield study action.

▶ Show retrieval prompts & answers
Q: Why is the pricing drift \(r\) and not the real-world \(\mu\)?
A: Because the option is priced by replication/no-arbitrage: the price equals the cost of the hedging portfolio, which is independent of \(\mu\). Equivalently, discounted prices are martingales under the risk-neutral measure where the drift is \(r\). It is a pricing device, not a forecast.
Q: How do you validate a Monte Carlo option price?
A: Reconcile it with the Black–Scholes closed form (the oracle): require \(|C_{\text{MC}}-C_{\text{BS}}|\) within a few standard errors \(\hat s/\sqrt N\), checking that a persistent bias (not shrinking with \(N\)) is absent.

Completion Checklist

Confidence / mastery rating
Personal notes

Source References

This lesson synthesizes and paraphrases concepts from the sources below. No copyrighted text, problem sets, or solutions are reproduced. Return to the originals for full depth.