@Override
public InterestRateCurveSensitivity visitSwap(final Swap<?, ?> swap, final YieldCurveBundle curves) {
ArgumentChecker.notNull(curves, "Curves");
ArgumentChecker.notNull(swap, "Swap");
final Currency ccy1 = swap.getFirstLeg().getCurrency();
final MultipleCurrencyInterestRateCurveSensitivity pvcsmc = swap.accept(PVCSMCC, curves);
final InterestRateCurveSensitivity pvcs = pvcsmc.converted(ccy1, curves.getFxRates()).getSensitivity(ccy1);
final InterestRateCurveSensitivity pvbpcs = swap.getFirstLeg().accept(PVBPCSC, curves);
final double pvbp = swap.getFirstLeg().accept(PVBPC, curves);
final double pv = curves.getFxRates().convert(swap.accept(PVMCC, curves), ccy1).getAmount();
// Implementation note: Total pv in currency 1.
return pvcs.multipliedBy(-1.0 / pvbp).plus(pvbpcs.multipliedBy(pv / (pvbp * pvbp)));