Does anyone have experience with the Python QuantLib function HestonBlackVolSurface? I'm trying to produce a 3D plot of the volatility surface as done in the example


Here is my attempt, based on the data of the example

import QuantLib as quant
heston_vol_surface = quant.HestonBlackVolSurface(

strikes_grid = np.arange(strikes[0], strikes[-1],10)
expiry = 1.0
implied_vols = [heston_vol_surface.blackVol(expiry, s)
                for s in strikes_grid]

I understand that I need to pass the the volatility term structure, but my knowledge of QuantLib is too limited right now. Thanks for you help.


Here is something I did, maybe it helps:


| improve this answer | |
  • $\begingroup$ You should include the content from your link. It would be helpful for future viewers should the link break. $\endgroup$ – amdopt May 20 at 13:21
  • $\begingroup$ @Ege Yilmaz thanks, that really helped a lot! $\endgroup$ – FunnyBuzer May 21 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.