So I have created a Swaption object and can get the premium with the NPV() function. However, I would also like to calculate the greeks (eg. delta, vega).
From some searching, I found that vega can be extracted from the additionalResults () function of the instrument class, but it doesn't seem to be defined for the Python version of Quantlib.
For example, let swaption
be an initialized instance of a Swaption object.
swaption.NPV()
gives me the value as expected, but swaption.additionalResults()
and swaption.result("Vega")
are not defined.
http://cogitolearning.co.uk/?p=490 This link shows the c++ analogue of these functions.
Otherwise, how could I calculate these values? I'm not sure if BlackCalculator is appropriate for these calculations on a swaption
.