I am currently trying to price swaptions under QuantLib/Python using a volatility cube using ql.SwaptoinVolCube2
. From the documentation:
optionTenors = ['1y', '2y', '3y']
swapTenors = [ '5Y', '10Y']
strikeSpreads = [ -0.01, 0.0, 0.01]
volSpreads = [
[0.5, 0.55, 0.6],
[0.5, 0.55, 0.6],
[0.5, 0.55, 0.6],
[0.5, 0.55, 0.6],
[0.5, 0.55, 0.6],
[0.5, 0.55, 0.6],
]
optionTenors = [ql.Period(tenor) for tenor in optionTenors]
swapTenors = [ql.Period(tenor) for tenor in swapTenors]
volSpreads = [[ql.QuoteHandle(ql.SimpleQuote(v)) for v in row] for row in volSpreads]
swapIndexBase = ql.EuriborSwapIsdaFixA(ql.Period(1, ql.Years), e6m_yts, ois_yts)
shortSwapIndexBase = ql.EuriborSwapIsdaFixA(ql.Period(1, ql.Years), e6m_yts, ois_yts)
vegaWeightedSmileFit = False
volCube = ql.SwaptionVolatilityStructureHandle(
ql.SwaptionVolCube2(
ql.SwaptionVolatilityStructureHandle(swaptionVolMatrix),
optionTenors,
swapTenors,
strikeSpreads,
volSpreads,
swapIndexBase,
shortSwapIndexBase,
vegaWeightedSmileFit)
)
Currently, I am wondering which role the two swap indices play in this?
I assume it has something to do with calculation of ATM and strike-spreads vs ATM, but I do not understand why it requires two indices for this.
Thanks for any pointers!