## Breeden-Litzenberger formula for risk-neutral densities

In 1978, Breeden and Litzenberger showed how under risk-neutral pricing, that the discounted Risk-Neutral Density (RND) function could be estimated directly from option prices.

In this tutorial we demonstrate how to use the Breeden-Litzenberger formula to derive the risk-neutral density function from European call options with stochastic volatilty under the Heston model. We price the call options using the semi-analytical solution for the Heston model using rectangular integration and compare this to the QuantLib implementation in Python. Once we have the option prices (or possibly market prices) we can implement the Breeden-Litzenberger formula easily using pandas dataframe shift functions. To utilise the estimated pdf within other calculations, we need to make use of scipy’s interpolation function.