Option Pricing: Black-Scholes and Beyond
Module: Fintech AI | Difficulty: Advanced
Black-Scholes Formula
Greeks
| Greek | Formula | Interpretation |
|---|---|---|
| Delta | Sensitivity to spot | |
| Gamma | Curvature | |
| Vega | Vol sensitivity | |
| Theta | Time decay |
Implied Volatility Surface
Heston Model
import numpy as np
from scipy.stats import norm
def black_scholes(S, K, T, r, sigma, option_type='call'):
d1 = (np.log(S/K) + (r + sigma**2/2)*T) / (sigma*np.sqrt(T))
d2 = d1 - sigma*np.sqrt(T)
if option_type == 'call':
return S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2)
return K*np.exp(-r*T)*norm.cdf(-d2) - S*norm.cdf(-d1)
def implied_vol(price, S, K, T, r, option_type='call'):
from scipy.optimize import brentq
func = lambda sigma: black_scholes(S, K, T, r, sigma, option_type) - price
return brentq(func, 0.01, 2.0)
Research Insight: The volatility smile reveals that Black-Scholes' constant volatility assumption is violated. Stochastic volatility models (Heston) and jump-diffusion models (Merton) capture this by allowing volatility to be random and adding jumps to the price process.