← Back to all projects

Project / 02

Black–Scholes and Heston Model Comparison

CategoryNumerical methods

StatusCompleted notebook

Year2026

Three-dimensional Heston implied-volatility surface
Heston semi-closed implied-volatility surface across maturity and log-moneyness.
Models3
MC paths20,000
Time steps126

I implemented Black–Scholes and the Heston semi-closed pricing formula, then compared the Heston results with a Monte Carlo simulation using a full-truncation Euler scheme.

The notebook reconstructs implied-volatility surfaces, studies the effect of correlation and vol-of-vol, and checks the numerical results using put–call parity, arbitrage bounds, Monte Carlo standard errors and confidence intervals.

The purpose is to better understand stochastic-volatility models and their numerical implementation rather than to present a calibrated production model.

What I wanted to understand

Understand how stochastic variance changes the shape and term structure of implied volatility relative to a constant-volatility baseline.

What the project covers

  1. Implement Black–Scholes and Black–76 pricing with a common implied-volatility inversion routine.
  2. Price Heston options through characteristic-function integration and verify them against full-truncation Euler Monte Carlo.
  3. Measure Monte Carlo standard errors and confidence intervals, then check put–call parity and no-arbitrage bounds.
  4. Study the effect of correlation and volatility of volatility and report the Feller-condition diagnostic.
for _ in range(max_iter):
    mid = 0.5 * (lo + hi)
    error = black76_price(F, K, T, r, mid, option_type) - price
    if abs(error) < tolerance:
        return mid

What the result does not claim

The Heston parameters are illustrative and are not calibrated to market data. The Monte Carlo method also retains discretisation bias, particularly when the variance process approaches zero.

PythonNumPySciPypandasMatplotlibMonte Carlo
Next project / 03Dynamic hedge ratios