24#ifndef quantlib_inflation_coupon_hpp
25#define quantlib_inflation_coupon_hpp
35 class YieldTermStructure;
36 class InflationCouponPricer;
50 const Date& startDate,
53 ext::shared_ptr<InflationIndex>
index,
76 const ext::shared_ptr<InflationIndex>&
index()
const {
return index_; }
96 void setPricer(
const ext::shared_ptr<InflationCouponPricer>&);
97 ext::shared_ptr<InflationCouponPricer>
pricer()
const;
100 ext::shared_ptr<InflationCouponPricer>
pricer_;
111 ext::shared_ptr<InflationCouponPricer>&)
const = 0;
125 inline ext::shared_ptr<InflationCouponPricer>
degenerate base class for the Acyclic Visitor pattern
coupon accruing over a fixed period
void accept(AcyclicVisitor &) override
Date exCouponDate() const override
returns the date that the cash flow trades exCoupon
virtual Real nominal() const
Time accrualPeriod() const
accrual period as fraction of year
Shared handle to an observable.
Base inflation-coupon class.
virtual Date fixingDate() const
fixing date
void performCalculations() const override
Natural fixingDays() const
fixing days
ext::shared_ptr< InflationCouponPricer > pricer_
ext::shared_ptr< InflationIndex > index_
Rate rate() const override
accrued rate
Real amount() const override
returns the amount of the cash flow
ext::shared_ptr< InflationCouponPricer > pricer() const
void accept(AcyclicVisitor &) override
Period observationLag() const
how the coupon observes the index
DayCounter dayCounter() const override
day counter for accrual calculation
virtual bool checkPricerImpl(const ext::shared_ptr< InflationCouponPricer > &) const =0
makes sure you were given the correct type of pricer
Real accruedAmount(const Date &) const override
accrued amount at the given date
virtual Rate indexFixing() const
fixing of the underlying index, as observed by the coupon
void setPricer(const ext::shared_ptr< InflationCouponPricer > &)
const ext::shared_ptr< InflationIndex > & index() const
yoy inflation index
Real price(const Handle< YieldTermStructure > &discountingCurve) const
Visitor for a specific class
virtual void visit(T &)=0
Coupon accruing over a fixed period.
unsigned QL_INTEGER Natural
positive integer
Globally accessible relinkable pointer.
ext::shared_ptr< BlackVolTermStructure > v
degenerate base class for the Acyclic Visitor pattern