final double fixingStartTime = payment.getFixingPeriodStartTime();
final double fixingEndTime = payment.getFixingPeriodEndTime();
final double paymentTime = payment.getPaymentTime();
final double beta = forwardCurve.getDiscountFactor(fixingStartTime) / forwardCurve.getDiscountFactor(fixingEndTime) * discountingCurve.getDiscountFactor(paymentTime)
/ discountingCurve.getDiscountFactor(fixingStartTime);
final PaymentFixed paymentStart = new PaymentFixed(payment.getCurrency(), fixingStartTime, payment.getFactor() * beta * payment.getNotional() * payment.getPaymentYearFraction()
/ payment.getFixingAccrualFactor(), payment.getFundingCurveName());
final PaymentFixed paymentEnd = new PaymentFixed(payment.getCurrency(), paymentTime, (-payment.getFactor() / payment.getFixingAccrualFactor() + payment.getSpread()) *
payment.getPaymentYearFraction()
* payment.getNotional(), payment.getFundingCurveName());
return new AnnuityPaymentFixed(new PaymentFixed[] {paymentStart, paymentEnd });
}