24#ifndef quantext_yoy_inflation_coupon_hpp
25#define quantext_yoy_inflation_coupon_hpp
27#include <ql/cashflow.hpp>
28#include <ql/cashflows/capflooredinflationcoupon.hpp>
29#include <ql/cashflows/yoyinflationcoupon.hpp>
30#include <ql/indexes/inflationindex.hpp>
31#include <ql/time/schedule.hpp>
41 YoYInflationCoupon(
const Date& paymentDate, Real nominal,
const Date& startDate,
const Date& endDate,
42 Natural fixingDays,
const ext::shared_ptr<YoYInflationIndex>& index,
43 const Period& observationLag,
const DayCounter& dayCounter, Real gearing = 1.0,
44 Spread spread = 0.0,
const Date& refPeriodStart = Date(),
const Date& refPeriodEnd = Date(),
45 bool addInflationNotional =
false);
48 Rate
rate()
const override;
53 virtual void accept(AcyclicVisitor&)
override;
63 Rate floor = Null<Rate>(),
bool addInflationNotional =
false);
66 Natural fixingDays,
const ext::shared_ptr<YoYInflationIndex>& index,
67 const Period& observationLag,
const DayCounter& dayCounter, Real gearing = 1.0,
68 Spread spread = 0.0,
const Rate cap = Null<Rate>(),
const Rate floor = Null<Rate>(),
69 const Date& refPeriodStart = Date(),
const Date& refPeriodEnd = Date(),
70 bool addInflationNotional =
false);
73 Rate
rate()
const override;
76 virtual void accept(AcyclicVisitor&)
override;
86 yoyInflationLeg(Schedule schedule, Calendar cal, ext::shared_ptr<YoYInflationIndex> index,
87 const Period& observationLag);
104 operator Leg()
const;
108 ext::shared_ptr<YoYInflationIndex>
index_;
bool addInflationNotional_
Rate rate() const override
virtual void accept(AcyclicVisitor &) override
CappedFlooredYoYInflationCoupon(const ext::shared_ptr< YoYInflationCoupon > &underlying, Rate cap=Null< Rate >(), Rate floor=Null< Rate >(), bool addInflationNotional=false)
bool addInflationNotional_
Rate rate() const override
virtual void accept(AcyclicVisitor &) override
yoyInflationLeg & withRateCurve(const Handle< YieldTermStructure > &rateCurve)
BusinessDayConvention paymentAdjustment_
bool addInflationNotional_
std::vector< Rate > caps_
yoyInflationLeg & withSpreads(Spread spread)
yoyInflationLeg & withFloors(Rate floor)
yoyInflationLeg & withPaymentAdjustment(BusinessDayConvention)
ext::shared_ptr< YoYInflationIndex > index_
yoyInflationLeg & withNotionals(Real notional)
Calendar paymentCalendar_
yoyInflationLeg & withGearings(Real gearing)
std::vector< Real > notionals_
std::vector< Spread > spreads_
yoyInflationLeg & withPaymentDayCounter(const DayCounter &)
Handle< YieldTermStructure > rateCurve_
std::vector< Natural > fixingDays_
yoyInflationLeg & withCaps(Rate cap)
yoyInflationLeg & withInflationNotional(bool addInflationNotional_)
std::vector< Rate > floors_
yoyInflationLeg & withFixingDays(Natural fixingDays)
std::vector< Real > gearings_
DayCounter paymentDayCounter_