QuantLib's SwaptionVolCube1x<Model>::marketVolCube() is very slow

17 views Asked by At

SwaptionVolCube1x::marketVolCube() is very slow when the SwapIndex passed in is an OIS Index. When SwapIndex is a non-OIS for example, EURIBOR_6M. the calculation is pretty fast.

The source code of marketVolCube shows that it calls calculate() even just to browse the marketVolCube. I reckon to get around the problem, I probably have to somehow force the object to freeze, so calculate() does not trigger performCalculations() which involves calculating OIS forward rate via function atmStrike.

Here are my questions:

  1. why performanceCalculations() is triggered even if I do not have any input changes (no rates changes, no vols changes). The volcube that I constructed is static.
  2. how to freeze the object in question to avoid the slow call of performanceCalculations()

QuantLib's marketVolCube enter image description here

0

There are 0 answers