22#include <ql/instruments/bonds/cmsratebond.hpp>
23#include <ql/cashflows/cmscoupon.hpp>
24#include <ql/cashflows/simplecashflow.hpp>
25#include <ql/indexes/swapindex.hpp>
26#include <ql/time/schedule.hpp>
34 const ext::shared_ptr<SwapIndex>& index,
38 const std::vector<Real>& gearings,
39 const std::vector<Spread>& spreads,
40 const std::vector<Rate>& caps,
41 const std::vector<Rate>& floors,
44 const Date& issueDate)
45 :
Bond(settlementDays, schedule.calendar(), issueDate) {
62 QL_ENSURE(!
cashflows().empty(),
"bond with no cashflows!");
63 QL_ENSURE(
redemptions_.size() == 1,
"multiple redemptions created");
void addRedemptionsToCashflows(const std::vector< Real > &redemptions=std::vector< Real >())
const Leg & cashflows() const
const ext::shared_ptr< CashFlow > & redemption() const
helper class building a sequence of capped/floored cms-rate coupons
CmsLeg & withFloors(Rate floor)
CmsLeg & withCaps(Rate cap)
CmsLeg & withGearings(Real gearing)
CmsLeg & withSpreads(Spread spread)
CmsLeg & withPaymentDayCounter(const DayCounter &)
CmsLeg & inArrears(bool flag=true)
CmsLeg & withNotionals(Real notional)
CmsLeg & withPaymentAdjustment(BusinessDayConvention)
CmsLeg & withFixingDays(Natural fixingDays)
CmsRateBond(Natural settlementDays, Real faceAmount, const Schedule &schedule, const ext::shared_ptr< SwapIndex > &index, const DayCounter &paymentDayCounter, BusinessDayConvention paymentConvention=Following, Natural fixingDays=Null< Natural >(), const std::vector< Real > &gearings={ 1.0 }, const std::vector< Spread > &spreads={ 0.0 }, const std::vector< Rate > &caps={}, const std::vector< Rate > &floors={}, bool inArrears=false, Real redemption=100.0, const Date &issueDate=Date())
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
const Date & endDate() const
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer