I am trying to run a Quantlib Python Monte Carlo simulation using either the ql.BlackScholesMertonProcess or the ql.GeneralizedBlackScholesProcess. I have a vol surface that I have generated using ql.BlackVarianceSurface. I am using ql.GaussianMultiPathGenerator as my path generator.
I would like the Monte Carlo process to simply use the implied volatility at the (K, expiry) point of my vol surface when generating the paths, but it seems that it calculates a local vol regardless of the parameters I pass. I believe this to be the case because I get errors of the type:
negative local vol^2 at strike 3657.69 and time 0.0119048; the black vol surface is not smooth enough
I have tried using:
- price_process = ql.BlackScholesMertonProcess(spot_handle,dividendTS=div_and_borrow_curve,riskFreeTS=yield_curve,volTS=volholder.volTS)
- price_process = ql.GeneralizedBlackScholesProcess(spot_handle, div_and_borrow_curve, yield_curve,vol_process, ql.LocalVolTermStructureHandle())
- price_process = ql.GeneralizedBlackScholesProcess(spot_handle, div_and_borrow_curve, yield_curve,vol_process) 1: calls the BlackScholesMertonProcess, which I believe makes no mention of local volatility in the constructor 2: calls the GeneralizedBlackScholesProcess but passes a dummy local vol: this fails when I got to generate paths: ‘empty Handle cannot be dereferenced’ 3: calls the GeneralizedBlackScholesProcess but doesn’t pass a local vol process
1 & 3 give me the ‘negative local vol^2’ errors and 2 doesn’t generate paths.
Does anyone know how I can call a GaussianMultiPathGenerator that simply uses my vol surface and doesn’t try to generate the paths with a local volatility calculation?
Thank you in advance