# QuantLib Swaption Vol Cube

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]
[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]

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,
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!

The swaption vol cube is basically a series of surface layers, each layer refers to a given strike and has vols for combinations of option expiries and swap tenors of the same underlying: a swap with given conventions. That underlying is defined by the swapIndexBase.
However, for shorter maturities, the conventions are often different. For example, in Euro, you have swap vs 6M Euribor for tenors > 1Y and swap vs 3M Euribor for the 1Y tenor. The shortSwapIndexBase is used to identify this second underlying.