public MultipleCurrencyAmount visitCapFloorCMSSpread(final CapFloorCMSSpread payment, final SABRSwaptionProviderInterface sabr) {
if (sabr.getSABRParameter() instanceof SABRInterestRateCorrelationParameters) {
// TODO: improve correlation data handling
final SABRInterestRateCorrelationParameters sabrCorrelation = (SABRInterestRateCorrelationParameters) sabr.getSABRParameter();
final CapFloorCMSSpreadSABRBinormalMethod method = new CapFloorCMSSpreadSABRBinormalMethod(sabrCorrelation.getCorrelation(), METHOD_CMS_CAP, METHOD_CMS_CPN);
return method.presentValue(payment, sabr);
}
throw new UnsupportedOperationException("The PresentValueSABRSwaptionCalculator visitor visitCapFloorCMSSpread requires a SABRInterestRateCorrelationParameters with correlation as data.");
}
// ----- Annuity ------