public FloatingRateBond(int settlementDays, double faceAmount, Schedule schedule, IborIndex index, DayCounter paymentDayCounter,
BusinessDayConvention paymentConvention, int fixingDays, List <double> gearings, List <double> spreads,
List <double> caps, List <double> floors, bool inArrears, double redemption, Date issueDate)
: base(settlementDays, schedule.calendar(), issueDate)
{
maturityDate_ = schedule.endDate();
cashflows_ = new IborLeg(schedule, index)
.withPaymentDayCounter(paymentDayCounter)
.withFixingDays(fixingDays)
.withGearings(gearings)
.withSpreads(spreads)
.withCaps(caps)
.withFloors(floors)
.inArrears(inArrears)
.withNotionals(faceAmount)
.withPaymentAdjustment(paymentConvention);
addRedemptionsToCashflows(new List <double>()
{
redemption
});
if (cashflows().Count == 0)
{
throw new ApplicationException("bond with no cashflows!");
}
if (redemptions_.Count != 1)
{
throw new ApplicationException("multiple redemptions created");
}
index.registerWith(update);
}