Derivatives Pricing
Monte Carlo pricing of European and American options under stochastic volatility (Heston) and jump-diffusion (Merton) models, including Greeks, LSMC for early exercise, and barrier option extensions.
This project implements and compares three increasingly rich option pricing frameworks: Black-Scholes (closed-form benchmark), the Heston stochastic volatility model, and the Merton jump-diffusion model, using Monte Carlo simulation throughout.
Greeks are computed via central finite differences with common random numbers to minimize noise. The Longstaff-Schwartz algorithm prices American options under the Heston model. Barrier options (up-and-in call, down-and-in put) extend the analysis to path-dependent contracts.
| Model | Contract | Method |
|---|---|---|
| Heston (rho=-0.30 and rho=-0.70) | European Call and Put | MC, 100k paths |
| Heston | Delta, Gamma | Central differences + CRN |
| Merton (lambda=0.75 and lambda=0.25) | European Call and Put | MC exact, 200k paths |
| Merton | Delta, Gamma | Central differences + CRN |
| Heston (rho=-0.30, -0.70) | American Call | LSMC (Longstaff-Schwartz), 80k paths |
| Heston (rho=-0.70) | Up-and-In Call | MC barrier monitoring |
| Merton (lambda=0.75) | Down-and-In Put | MC barrier monitoring |
| Parameter | Value | Description |
|---|---|---|
| S0 | 80.0 | Initial stock price |
| K | 80.0 | Strike price (ATM) |
| r | 5.5% | Risk-free rate |
| T | 0.25 | Maturity (3 months) |
| sigma | 35% | Diffusion volatility (Merton / BS) |
| v0 | 3.2% | Initial variance (Heston) |
| kappa | 1.85 | Mean-reversion speed (Heston) |
| theta | 4.5% | Long-run variance (Heston) |
| xi | 0.60 | Vol-of-vol (Heston) |
| muJ | -0.50 | Mean log-jump size (Merton) |
| deltaJ | 0.22 | Std log-jump size (Merton) |
The Heston model allows variance to evolve as a mean-reverting CIR process correlated with the stock:
dS = r*S*dt + sqrt(v)*S*dW_S
dv = kappa*(theta - v)*dt + xi*sqrt(v)*dW_v
Cov(dW_S, dW_v) = rho*dt
Monte Carlo scheme: Full-truncation Euler discretization for the variance process (guaranteeing non-negativity), log-Euler scheme for the stock price. Correlated Brownian increments are generated via Cholesky factorization:
dW_v = rho*dW_S + sqrt(1 - rho^2)*dZ
Effect of correlation rho: More negative rho increases negative skew in the terminal distribution. When markets fall, volatility rises more sharply, raising put prices and modestly reducing call prices relative to a symmetric model, consistent with the empirically observed volatility skew.
Greeks via central differences with common random numbers (CRN):
Delta = [V(S0+h) - V(S0-h)] / (2h)
Gamma = [V(S0+h) - 2*V(S0) + V(S0-h)] / h^2
CRNs reuse identical random draws across all three bumps, reducing finite-difference noise by an order of magnitude compared to independent draws.
American Call via Longstaff-Schwartz MC (LSMC): Paths are simulated forward under Heston; early exercise is determined by comparing the immediate exercise payoff against the estimated continuation value obtained from a polynomial regression of discounted future payoffs. Basis functions include S, S^2, variance v, and the cross-term v*S.
The Merton model augments GBM with a compound Poisson jump process:
d(ln S) = (r - lambda*k - 0.5*sigma^2)*dt + sigma*dW + sum_{i=1}^{N_t} Y_i
where N_t ~ Poisson(lambda*T), Y_i ~ N(muJ, deltaJ^2), and k = E[e^Y - 1].
Exact simulation at maturity: Because the jump process has a known conditional distribution given the Poisson count, exact terminal simulation is available without time-stepping. This is more efficient and more accurate than time-stepping for European options.
Effect of jump intensity lambda: Higher lambda (more frequent jumps) increases the probability of large downward moves given muJ < 0, raising put prices substantially and widening the distribution. The call is also affected through the compensator k embedded in the risk-neutral drift.
Greeks via CRN central differences: Same methodology as the Heston Greeks, reusing the Poisson and Brownian draws across all three spot levels.
European Up-and-In Call (Heston, B = 95):
An up-and-in call activates only if the stock price breaches the barrier B from below during the option's life. Since B = 95 > S0 = 80, the barrier is out-of-the-money at inception. Discrete monitoring is applied at each simulation step (63 steps for 3 months). The knock-in price is at most equal to the vanilla call price, as the barrier condition filters out paths that finish in-the-money without having first visited the barrier.
European Down-and-In Put (Merton, B = 65):
A down-and-in put activates only if the stock breaches B = 65 from above. Since B < S0 = 80, the put is deep OTM at inception and the barrier only activates on adverse paths. Jumps under Merton significantly increase the barrier hit probability compared to pure GBM, making the down-and-in put price substantially higher than under a diffusion-only model. The knock-in price is bounded above by the vanilla put price.
- More negative Heston correlation (
rho = -0.70vs-0.30) raises put prices and lowers call prices, reflecting downside skew - Merton with higher jump intensity (
lambda = 0.75vs0.25) significantly raises both call and put prices through increased tail risk - The American call early exercise premium is near zero for non-dividend-paying stocks under both rho values, confirming that early exercise is never optimal for plain vanilla calls
- The up-and-in call price is strictly below the vanilla call, as the knock-in requirement removes probability mass from the payoff
- Merton's jump process materially increases the down-and-in put probability relative to a diffusion-only model, through discrete jump arrivals that can cross the barrier in a single step
Python 3.x
numpy
scipy
pandas
matplotlib
git clone https://github.com/QuantSingularity/Heston-Merton-LSMC-Barrier-Options-Pricing.git
cd Heston-Merton-LSMC-Barrier-Options-Pricing
pip install numpy scipy pandas matplotlib
jupyter notebook Heston-Merton-LSMC-Barrier-Options-Pricing.ipynb- Heston, S.L. (1993). A Closed-Form Solution for Options with Stochastic Volatility. Review of Financial Studies, 6(2), 327-343.
- Merton, R.C. (1976). Option Pricing When Underlying Stock Returns are Discontinuous. Journal of Financial Economics, 3(1-2), 125-144.
- Longstaff, F.A., and Schwartz, E.S. (2001). Valuing American Options by Simulation: A Simple Least-Squares Approach. Review of Financial Studies, 14(1), 113-147.
- Lord, R., Koekkoek, R., and van Dijk, D. (2010). A Comparison of Biased Simulation Schemes for Stochastic Volatility Models. Quantitative Finance, 10(2), 177-194.
- Hull, J.C. (2018). Options, Futures, and Other Derivatives (10th ed.). Pearson.