37 ext::shared_ptr<ZeroInflationIndex> zii,
41 maturity_(maturity), calendar_(
std::move(calendar)), paymentConvention_(paymentConvention),
42 dayCounter_(
std::move(dayCounter)), zii_(
std::move(zii)),
43 observationInterpolation_(observationInterpolation),
44 nominalTermStructure_(
std::move(nominalTermStructure)) {
50 (maturity > interpolationPeriod.first)) {
66 "inconsistency between swap observation lag "
67 <<
swapObsLag_ <<
", index period " << pShift <<
" and index availability "
68 <<
zii_->availabilityLag() <<
": need (obsLag-index period) >= availLag");
88 const bool own =
false;
94 ext::shared_ptr<ZeroInflationTermStructure>(z,
null_deleter()), own);
96 ext::shared_ptr<ZeroInflationIndex> new_zii =
zii_->clone(zits);
98 Real nominal = 1000000.0;
114 const Date& maturity,
118 ext::shared_ptr<YoYInflationIndex> yii,
121 maturity_(maturity), calendar_(
std::move(calendar)), paymentConvention_(paymentConvention),
122 dayCounter_(
std::move(dayCounter)), yii_(
std::move(yii)),
123 nominalTermStructure_(
std::move(nominalTermStructure)) {
125 if (
yii_->interpolated()) {
135 std::pair<Date, Date> limStart =
144 if (
yii_->interpolated()) {
147 "inconsistency between swap observation lag "
148 <<
swapObsLag_ <<
", index period " << pShift <<
" and index availability "
149 <<
yii_->availabilityLag() <<
": need (obsLag-index period) >= availLag");
159 return yyiis_->fairRate();
169 const bool own =
false;
174 ext::shared_ptr<YoYInflationTermStructure>(
y,
null_deleter()), own);
176 ext::shared_ptr<YoYInflationIndex> new_yii =
yii_->clone(yyts);
189 const Schedule& yoySchedule = fixedSchedule;
193 Real nominal = 1000000.0;
Base helper class for bootstrapping.
const Handle< Quote > & quote() const
virtual void setTermStructure(TS *)
sets the term structure to be used for pricing
Discounting engine for swaps.
Shared handle to an observable.
MakeSchedule & withConvention(BusinessDayConvention)
MakeSchedule & backwards()
MakeSchedule & to(const Date &terminationDate)
MakeSchedule & withTenor(const Period &)
MakeSchedule & from(const Date &effectiveDate)
MakeSchedule & withCalendar(const Calendar &)
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
DateProxy & evaluationDate()
the date at which pricing is to be performed.
static Settings & instance()
access to the unique instance
YearOnYearInflationSwapHelper(const Handle< Quote > "e, const Period &swapObsLag_, const Date &maturity, Calendar calendar, BusinessDayConvention paymentConvention, DayCounter dayCounter, ext::shared_ptr< YoYInflationIndex > yii, Handle< YieldTermStructure > nominalTermStructure)
void setTermStructure(YoYInflationTermStructure *) override
ext::shared_ptr< YearOnYearInflationSwap > yyiis_
ext::shared_ptr< YoYInflationIndex > yii_
Handle< YieldTermStructure > nominalTermStructure_
BusinessDayConvention paymentConvention_
Real impliedQuote() const override
Year-on-year inflation-indexed swap.
Base class for year-on-year inflation term structures.
Handle< YieldTermStructure > nominalTermStructure_
ZeroCouponInflationSwapHelper(const Handle< Quote > "e, const Period &swapObsLag, const Date &maturity, Calendar calendar, BusinessDayConvention paymentConvention, DayCounter dayCounter, ext::shared_ptr< ZeroInflationIndex > zii, CPI::InterpolationType observationInterpolation, Handle< YieldTermStructure > nominalTermStructure)
void setTermStructure(ZeroInflationTermStructure *) override
BusinessDayConvention paymentConvention_
Real impliedQuote() const override
CPI::InterpolationType observationInterpolation_
ext::shared_ptr< ZeroInflationIndex > zii_
ext::shared_ptr< ZeroCouponInflationSwap > zciis_
Zero-coupon inflation-indexed swap.
Interface for zero inflation term structures.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
BusinessDayConvention
Business Day conventions.
Real Spread
spreads on interest rates
Bootstrap helpers for inflation term structures.
base classes for inflation indexes
QuantLib::CPI::InterpolationType effectiveInterpolationType(const QuantLib::CPI::InterpolationType &type=QuantLib::CPI::AsIndex)
std::pair< Date, Date > inflationPeriod(const Date &d, Frequency frequency)
utility function giving the inflation period for a given date
empty deleter for shared_ptr
InterpolationType
when you observe an index, how do you interpolate between fixings?
@ Linear
linearly between bracketing fixings