Simulating the Heston Model with Python | Stochastic Volatility Modelling
QuantPy QuantPy
67.8K subscribers
22,582 views
0

 Published On Mar 18, 2022

The Heston model is a useful model for simulating stochastic volatility and its effect on the potential paths an asset can take over the life of an option. It's popular because of:
- easy closed-form solution for European option pricing
- no risk of negative variances
- incorporation of leverage effect
This allows for more effective modeling than the Black-Scholes formula allows due to its restrictive assumption of constant volatility.

One of the nice things about the Heston model for European option prices is that there is a closed-form solution once you have the characteristic function. So, discretisation of the SDE is not required for valuing a European option, however if you would like to value other option types with complex features using the Heston model than you can use the following code.

Written Tutorial on Medium:   / simulating-the-heston-model-in-python  

★ ★ Code Available on GitHub ★ ★
GitHub: https://github.com/TheQuantPy
Specific Tutorial Link: https://github.com/TheQuantPy/youtube...

Great resource for explanation here in how to complete the Euler Discretization:
- Euler and Milstein Discretization by Fabrice Douglas Rouah https://frouah.com/finance%20notes/Eu...

00:00 Intro
00:53 Heston Model Dynamics
02:15 Monte Carlo Simulation and SDE Discretization
05:03 Heston Model Simulation in Python
10:00 Visualising the asset price density and volatility smile

★ ★ QuantPy GitHub ★ ★
Collection of resources used on QuantPy YouTube channel. https://github.com/thequantpy

★ ★ Discord Community ★ ★
Join a small niche community of like-minded quants on discord.   / discord  

★ ★ Support our Patreon Community ★ ★
Get access to Jupyter Notebooks that can run in the browser without downloading python.
  / quantpy  

★ ★ ThetaData API ★ ★
ThetaData's API provides both realtime and historical options data for end-of-day, and intraday trades and quotes. Use coupon 'QPY1' to receive 20% off on your first month.
https://www.thetadata.net/

★ ★ Online Quant Tutorials ★ ★
WEBSITE: https://quantpy.com.au

★ ★ Contact Us ★ ★
EMAIL: [email protected]

Disclaimer: All ideas, opinions, recommendations and/or forecasts, expressed or implied in this content, are for informational and educational purposes only and should not be construed as financial product advice or an inducement or instruction to invest, trade, and/or speculate in the markets. Any action or refraining from action; investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied in this content, are committed at your own risk an consequence, financial or otherwise. As an affiliate of ThetaData, QuantPy Pty Ltd is compensated for any purchases made through the link provided in this description.

show more

Share/Embed