30 const Date& startDate,
33 ext::shared_ptr<InflationIndex> index,
34 const Period& observationLag,
36 const Date& refPeriodStart,
37 const Date& refPeriodEnd,
38 const Date& exCouponDate)
46 index_(
std::move(index)), observationLag_(observationLag), dayCounter_(
std::move(dayCounter)),
47 fixingDays_(fixingDays) {
96 return amount() * discountingCurve->discount(
date());
coupon accruing over a fixed period
virtual Real nominal() const
Date date() const override
Time accruedPeriod(const Date &) const
accrued period as fraction of year at the given date
Shared handle to an observable.
virtual Date fixingDate() const
fixing date
void performCalculations() const override
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
InflationCoupon(const Date &paymentDate, Real nominal, const Date &startDate, const Date &endDate, Natural fixingDays, ext::shared_ptr< InflationIndex > index, const Period &observationLag, DayCounter dayCounter, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date(), const Date &exCouponDate=Date())
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 > &)
Real price(const Handle< YieldTermStructure > &discountingCurve) const
virtual void calculate() const
Size unregisterWith(const ext::shared_ptr< Observable > &)
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
static Settings & instance()
access to the unique instance
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
unsigned QL_INTEGER Natural
positive integer
QL_INTEGER Integer
integer number
base classes for inflation indexes
Interest-rate term structure.
Coupon paying a yoy inflation index.