3
$\begingroup$

I create a vol surface from the market and do smoothing(interpolation and extrapolation), and explicitly correct for any total variance decreasing on a given strike as we increase maturity. I create a ql.BlackVarianceSurface surface with my grid and am able to price using most quantlib engines. When I use my surface to create Monte Carlo paths using ql.BlackScholesMertonProcess and ql.GaussianMultiPathGenerator,however, I invariably get an error of the type: "RuntimeError: negative local vol^2 at strike 2167.82 and time 0.138889; the black vol surface is not smooth enough". If I create an Andreasen Huge surface using ql.AndreasenHugeVolatilityAdapter, then I get a local vol surface I can use for Monte Carlo paths. However, I want to have more control about how the surface is created so I am trying to create my own surface from the data, rather than running AH. If I poll the Ql vol surface using vol_process.blackVol(expiry, strike), I don’t find any decreasing total variance violations, so I believe something else is leading QL to say the surface is not smooth enough.

Does anyone know why QL may find the surface unsatisfactory, and anything I can do/ check for/ or change? Note I check the QL surface for both falling variance and for butterfly variations (along expiries).

thank you very much for the help

$\endgroup$
1
  • $\begingroup$ by the way, I'm using QuantLib in Python $\endgroup$
    – vman
    Commented Dec 7, 2022 at 16:34

1 Answer 1

1
$\begingroup$

This is because QuantLib checks if the model you calibrated has "calendar arbitrage". https://github.com/lballabio/QuantLib/issues/1124

$\endgroup$
4
  • $\begingroup$ For QuantLib local vol implementation $\endgroup$ Commented Apr 3, 2023 at 10:26
  • 1
    $\begingroup$ Could the error message from the library be any less helpful? Or, could it be more helpful by providing more context? $\endgroup$ Commented Apr 3, 2023 at 12:29
  • 1
    $\begingroup$ As a very general guideline, a more helpful error message might say what you wrote, but also show which specific inputs cause a problem, and by how much they might change, possibly in multiple ways, for the problem to go away. $\endgroup$ Commented Apr 3, 2023 at 14:11
  • 1
    $\begingroup$ For example, totally making up some numbers, suppose a library can't bootstrap a swap curve from quotes: 3Y 5%, 4Y 25%, 5Y 5%. A more helpful error message might say something along the lines of, "can't bootstrap because quotes admit arbitrage - 4Y 25% and 5Y 5% imply 4 1 forward rate -250% < -100%. Arbitrage may be removed if 4Y were 15% or 5Y were 10%". making up the numbers. Further, you may want to allow market data that arises from small perturbations under risk scenarios to admit arbitrage. $\endgroup$ Commented Apr 3, 2023 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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