Vol_Curve__Create_Implied_Vol_Table

FunctionFor options other than swaptions, the returned implied vols span the option expiries and strikes of the input options and are therefore represented by a Table2D

For swaptions, the returned implied vols generally span the option expiries, underlying swap tenors and strikes and are therefore represented by a 3-dimensional HyperTable

Note the swaption implied vols are reported in the same format that a 3-dimensional vol table must have when used as input in the pricing of swaptions, i.e. the strikes are expressed as atm swap rate spreads and the otm vols as atm vol spreads.

In the special case where the input options are all at-the-money, the returned implied vols span only the option expiries and underlying swap tenors and are therefore represented by a Table2D

For all kinds of options, the returned vols are such, that if they were to be fed to the valuation algorithm described below, then the result would be option prices that match the provided target prices.

The valuation algorithm utilized by QuantLib depends on the option's exercise type.

All european options are priced through the analytic Black Scholes Merton model.

Non-european options are priced through the Finite Differences Crank Nicolson method, with the exception of non-european swaptions for which no implied vol can be calculated.

Note the volatility matrix elements that do not correspond to the provided options are filled using linear interpolation and flat extrapolation.