23#ifndef quantext_cmb_coupon_hpp
24#define quantext_cmb_coupon_hpp
26#include <ql/cashflows/floatingratecoupon.hpp>
27#include <ql/time/schedule.hpp>
37 const Date& startDate,
40 const ext::shared_ptr<ConstantMaturityBondIndex>& index,
43 const Date& refPeriodStart = Date(),
44 const Date& refPeriodEnd = Date(),
45 const DayCounter& dayCounter = DayCounter(),
46 bool isInArrears =
false,
47 const Date& exCouponDate = Date());
50 void accept(AcyclicVisitor&)
override;
58 void setPricer(
const ext::shared_ptr<FloatingRateCouponPricer>& pricer)
override;
75 Rate
capletRate(Rate effectiveCap)
const override;
80 ext::shared_ptr<ConstantMaturityBondIndex>
index_;
89 CmbLeg(Schedule schedule, std::vector<ext::shared_ptr<ConstantMaturityBondIndex>> bondIndices);
109 BusinessDayConvention,
111 operator Leg()
const;
bond index class representing historical and forward bond prices
const ext::shared_ptr< ConstantMaturityBondIndex > & bondIndex() const
void accept(AcyclicVisitor &) override
ext::shared_ptr< ConstantMaturityBondIndex > bondIndex_
void setPricer(const ext::shared_ptr< FloatingRateCouponPricer > &pricer) override
Base pricer for vanilla CMB coupons.
Real capletPrice(Rate effectiveCap) const override
Rate floorletRate(Rate effectiveFloor) const override
ext::shared_ptr< ConstantMaturityBondIndex > index_
void initialize(const FloatingRateCoupon &coupon) override
const CmbCoupon * coupon_
Rate swapletRate() const override
Real floorletPrice(Rate effectiveFloor) const override
Real swapletPrice() const override
Rate capletRate(Rate effectiveCap) const override
helper class building a sequence of capped/floored cmb coupons
BusinessDayConvention paymentAdjustment_
std::vector< Rate > caps_
std::vector< ext::shared_ptr< ConstantMaturityBondIndex > > bondIndices_
BusinessDayConvention exCouponAdjustment_
CmbLeg & withExCouponPeriod(const Period &, const Calendar &, BusinessDayConvention, bool endOfMonth)
Calendar paymentCalendar_
CmbLeg & withNotionals(Real notional)
CmbLeg & withGearings(Real gearing)
CmbLeg & withFixingDays(Natural fixingDays)
std::vector< Real > notionals_
std::vector< Spread > spreads_
CmbLeg & withFloors(Rate floor)
CmbLeg & withPaymentAdjustment(BusinessDayConvention)
std::vector< Natural > fixingDays_
Calendar exCouponCalendar_
std::vector< Rate > floors_
CmbLeg & withZeroPayments(bool flag=true)
CmbLeg & withSpreads(Spread spread)
CmbLeg & withPaymentCalendar(const Calendar &cal)
CmbLeg & inArrears(bool flag=true)
CmbLeg & withPaymentDayCounter(const DayCounter &)
CmbLeg & withCaps(Rate cap)
std::vector< Real > gearings_
DayCounter paymentDayCounter_