↓ Skip to main content

Recent

Calculating Implied Volatility with Newton-Raphson in NumPy - Verified Against Market Prices

Calculating Implied Volatility with Newton-Raphson in NumPy - Verified Against Market Prices

When we have a market price for an option, we often want to know what implied volatility produced that price. This is the implied volatility (IV) — the volatility parameter that, when fed into the Black-Scholes formula, reproduces the observed market price. In this post, we implement a robust implied volatility solver in NumPy using Newton-Raphson optimization with a bisection fallback, and verify it against test cases where the true volatility is known.
Implied Volatility Surface Construction from Local Volatility — Dupire Formula Verification

Implied Volatility Surface Construction from Local Volatility — Dupire Formula Verification

The volatility surface is the cornerstone of modern option pricing. Market participants quote prices in terms of implied volatility rather than price, and pricing models must reproduce this surface to be viable. In this post, we build an implied volatility surface from a local volatility model: simulate paths under the local volatility dynamics, compute call prices, and invert Black-Scholes numerically. Along the way we state Dupire’s formula correctly — it maps option prices to local volatility, not the other way around — together with Gatheral’s formula, which is the known analytical bridge from the implied surface to the local one. Every number shown comes from a reproducible NumPy script with numpy.random.default_rng(42).