} else {
settleTime = TimeCalculator.getTimeBetween(date, settlementDate);
accruedInterestAtSettle = accruedInterest(settlementDate);
}
final AnnuityPaymentFixed nominal = (AnnuityPaymentFixed) getNominal().toDerivative(date, creditCurveName);
AnnuityCouponFixedDefinition couponDefinition = getCoupons();
couponDefinition = getCoupons().trimBefore(settlementDate);
final CouponFixedDefinition[] couponExPeriodArray = new CouponFixedDefinition[couponDefinition.getNumberOfPayments()];
System.arraycopy(couponDefinition.getPayments(), 0, couponExPeriodArray, 0, couponDefinition.getNumberOfPayments());
if (getExCouponDays() != 0) {
final ZonedDateTime exDividendDate = ScheduleCalculator.getAdjustedDate(couponDefinition.getNthPayment(0).getPaymentDate(), -getExCouponDays(), getCalendar());
if (settlementDate.isAfter(exDividendDate)) {
// Implementation note: Ex-dividend period: the next coupon is not received but its date is required for yield calculation
couponExPeriodArray[0] = new CouponFixedDefinition(couponDefinition.getNthPayment(0), 0.0);
}
}
final AnnuityCouponFixedDefinition couponDefinitionExPeriod = new AnnuityCouponFixedDefinition(couponExPeriodArray, getCalendar());
final AnnuityCouponFixed couponStandard = couponDefinitionExPeriod.toDerivative(date, yieldCurveNames);
final AnnuityPaymentFixed nominalStandard = nominal.trimBefore(settleTime);
final double factorSpot = getDayCount().getAccruedInterest(couponDefinition.getNthPayment(0).getAccrualStartDate(), settlementDate,
couponDefinition.getNthPayment(0).getAccrualEndDate(), 1.0, _couponPerYear);
final double factorPeriod = getDayCount().getAccruedInterest(couponDefinition.getNthPayment(0).getAccrualStartDate(),
couponDefinition.getNthPayment(0).getAccrualEndDate(), couponDefinition.getNthPayment(0).getAccrualEndDate(), 1.0, _couponPerYear);