final double[] floorIbor = new double[] {0.0, 0.0, -10.0};
final double[] capIbor = new double[] {0.0, 0.0, +50.0};
final AnnuityCouponIborRatchetDefinition ratchetFixedDefinition = AnnuityCouponIborRatchetDefinition.withFirstCouponFixed(SETTLEMENT_DATE, ANNUITY_TENOR, NOTIONAL, EURIBOR3M, IS_PAYER,
FIRST_CPN_RATE, mainIbor, floorIbor, capIbor, TARGET);
final AnnuityCouponIborRatchet ratchetFixed = ratchetFixedDefinition.toDerivative(REFERENCE_DATE, FIXING_TS);
final AnnuityCouponIborDefinition iborDefinition = AnnuityCouponIborDefinition.from(SETTLEMENT_DATE, ANNUITY_TENOR, NOTIONAL, EURIBOR3M, IS_PAYER, TARGET);
final Annuity<? extends Coupon> ibor = iborDefinition.toDerivative(REFERENCE_DATE, FIXING_TS);
final Coupon[] iborFirstFixed = new Coupon[ibor.getNumberOfPayments()];
iborFirstFixed[0] = ratchetFixed.getNthPayment(0);
for (int loopcpn = 1; loopcpn < ibor.getNumberOfPayments(); loopcpn++) {
iborFirstFixed[loopcpn] = ibor.getNthPayment(loopcpn);
}