.withCouponRates(couponRates)
.withPaymentAdjustment(BusinessDayConvention.ModifiedFollowing).Leg();
// redemption
cashflows.add(new SimpleCashFlow(faceAmount, cashflows.last().date()));
final Bond bond = new Bond(settlementDays, new Brazil(Brazil.Market.SETTLEMENT),
faceAmount, cashflows.last().date(),
new Date(1,Month.January,2007), cashflows);
final double cachedPrice = prices[bondIndex];
final double price = faceAmount*bond.dirtyPrice(yield.rate(),
yield.dayCounter(),
yield.compounding(),
yield.frequency(),
today)/100;
if (Math.abs(price-cachedPrice) > tolerance) {