Skip to content

BallesJr/heston-option-pricing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HESTON OPTION PRICING

This project extends the classic Black-Scholes framework by implementing the Heston stochastic volatility model. Unlike Black-Scholes, where volatility is constant, Heston models volatility as a mean-reverting stochastic process, leading to a more realistic price distribution. The analytical solution requires numerical integration over a complex characteristic function.

FEATURES

Monte Carlo simulation: Simulates 10000 different paths that the price can follow.

Analytical price: Calculates the fair price using the analytical formula, which includes the complex integral.

Price and volatility visualization: Generates a visual representation of both price and volatility paths for the first 20 simulations.

Convergence plot: Plots the running average to check that the simulation tends to the analytical optimal price.

RESULTS

The convergence plot shows how the Law of Large Numbers works because with 50000 simulations the average price and the analytical price are almost exactly the same.

Call price (Monte Carlo): $10.3962

Call price (Analytical): $10.3942

Difference: $0.0020

Delta: 0.6917

REQUIREMENTS

numpy, matplotlib, numba, scipy

EXECUTION

Execute python heston_mc.py

About

Monte Carlo and analytical pricing engine for European options under the Heston stochastic volatility model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages