38 ext::shared_ptr<ZeroInflationIndex> zii,
42 maturity_(maturity), calendar_(
std::move(calendar)), paymentConvention_(paymentConvention),
43 dayCounter_(
std::move(dayCounter)), zii_(
std::move(zii)),
44 observationInterpolation_(observationInterpolation),
45 nominalTermStructure_(
std::move(nominalTermStructure)) {
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,
122 maturity_(maturity), calendar_(
std::move(calendar)), paymentConvention_(paymentConvention),
123 dayCounter_(
std::move(dayCounter)), yii_(
std::move(yii)), interpolation_(interpolation),
124 nominalTermStructure_(
std::move(nominalTermStructure)) {
145 "inconsistency between swap observation lag "
146 <<
swapObsLag_ <<
", index period " << pShift <<
" and index availability "
147 <<
yii_->availabilityLag() <<
": need (obsLag-index period) >= availLag");
157 const Date& maturity,
161 ext::shared_ptr<YoYInflationIndex> yii,
164 std::move(dayCounter),
std::move(yii),
CPI::AsIndex,
std::move(nominalTermStructure)) {}
169 return yyiis_->fairRate();
179 const bool own =
false;
184 ext::shared_ptr<YoYInflationTermStructure>(
y,
null_deleter()), own);
186 ext::shared_ptr<YoYInflationIndex> new_yii =
yii_->clone(yyts);
199 const Schedule& yoySchedule = fixedSchedule;
203 Real nominal = 1000000.0;
204 yyiis_ = ext::make_shared<YearOnYearInflationSwap>(
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
Year-on-year inflation-swap bootstrap helper.
void setTermStructure(YoYInflationTermStructure *) override
ext::shared_ptr< YearOnYearInflationSwap > yyiis_
CPI::InterpolationType interpolation_
YearOnYearInflationSwapHelper(const Handle< Quote > "e, const Period &swapObsLag_, const Date &maturity, Calendar calendar, BusinessDayConvention paymentConvention, DayCounter dayCounter, ext::shared_ptr< YoYInflationIndex > yii, CPI::InterpolationType interpolation, Handle< YieldTermStructure > nominalTermStructure)
ext::shared_ptr< YoYInflationIndex > yii_
Handle< YieldTermStructure > nominalTermStructure_
BusinessDayConvention paymentConvention_
Real impliedQuote() const override
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_
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
bool isInterpolated(const QuantLib::CPI::InterpolationType &type)
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
Maps shared_ptr to either the boost or std implementation.
InterpolationType
when you observe an index, how do you interpolate between fixings?