.endOfMonth(libor3m.endOfMonth())
.backwards()
.schedule();
final BMASwap swap = new BMASwap(BMASwap.Type.Payer, 100.0,
liborSchedule, 0.75, 0.0,
libor3m, libor3m.dayCounter(),
bmaSchedule, bma, vars.bmaDayCounter);
swap.setPricingEngine(new DiscountingSwapEngine(libor3m.termStructure()));
/*@Real*/ final double expectedFraction = bmaData[i].rate/100;
/*@Real*/ final double estimatedFraction = swap.fairLiborFraction();
/*@Real*/ final double error = Math.abs(expectedFraction-estimatedFraction);
if (error > tolerance) {
throw new RuntimeException(
String.format("%d %s %s %f %s %f %s %f %s %f",
bmaData[i].n, " year(s) BMA swap:\n",