With the QuantLib C++ library, I'm trying to evaluate bonds which have different coupons during their lifetime (for example 6% for the first three years, then 4% for the remaining three years).
I noticed that the constructor of the FixedRateBond
class accepts a vector of coupons: const std::vector< Rate > &coupons
:
FixedRateBond (Natural settlementDays,
Real faceAmount,
const Schedule &schedule,
const std::vector< Rate > &coupons,
const DayCounter &accrualDayCounter,
BusinessDayConvention paymentConvention=Following,
Real redemption=100.0,
const Date &issueDate=Date(),
const Calendar &paymentCalendar=Calendar())
That seems to be useful for my purpose, but how can I specify at which dates each coupon starts to apply?