20#include <ql/indexes/inflationindex.hpp>
21#include <ql/cashflows/yoyinflationcoupon.hpp>
24using QuantLib::BusinessDayConvention;
25using QuantLib::Calendar;
26using QuantLib::DateGeneration;
27using QuantLib::DayCounter;
29using QuantLib::Handle;
31using QuantLib::Natural;
32using QuantLib::Period;
33using QuantLib::PricingEngine;
37using QuantLib::Schedule;
38using QuantLib::Settings;
39using QuantLib::YoYInflationCapFloor;
40using QuantLib::yoyInflationLeg;
41using QuantLib::YoYInflationIndex;
47 YoYInflationCapFloor::Type type,
49 Natural settlementDays,
51 const QuantLib::ext::shared_ptr<YoYInflationIndex>& yoyIndex,
52 const Period& observationLag,
53 const Calendar& yoyCalendar,
54 BusinessDayConvention yoyConvention,
55 const DayCounter& yoyDayCount,
56 const Calendar& paymentCalendar,
57 BusinessDayConvention paymentConvention,
58 const Period& yoyTenor)
60 evaluationDate_(Settings::instance().evaluationDate()),
63 settlementDays_(settlementDays),
66 observationLag_(observationLag),
67 yoyCalendar_(yoyCalendar),
68 yoyConvention_(yoyConvention),
69 yoyDayCount_(yoyDayCount),
70 paymentCalendar_(paymentCalendar),
71 paymentConvention_(paymentConvention),
75 registerWith(Settings::instance().evaluationDate());
115 auto end = start +
tenor_;
QuantLib::Real modelValue() const
Return the model value.
QuantLib::Period observationLag_
QuantLib::Real marketValue() const
Return the market premium value.
QuantLib::ext::shared_ptr< QuantLib::PricingEngine > engine_
The pricing engine used to value the YoY swap.
QuantLib::BusinessDayConvention paymentConvention_
QuantLib::Period yoyTenor_
YoYCapFloorHelper(const QuantLib::Handle< QuantLib::Quote > &premium, QuantLib::YoYInflationCapFloor::Type type, QuantLib::Rate strike, QuantLib::Natural settlementDays, const QuantLib::Period &tenor, const QuantLib::ext::shared_ptr< QuantLib::YoYInflationIndex > &yoyIndex, const QuantLib::Period &observationLag, const QuantLib::Calendar &yoyCalendar, QuantLib::BusinessDayConvention yoyConvention, const QuantLib::DayCounter &yoyDayCount, const QuantLib::Calendar &paymentCalendar, QuantLib::BusinessDayConvention paymentConvention, const QuantLib::Period &yoyTenor=1 *QuantLib::Years)
QuantLib::YoYInflationCapFloor::Type type_
QuantLib::Date evaluationDate_
QuantLib::Real calibrationError() override
QuantLib::DayCounter yoyDayCount_
QuantLib::Natural settlementDays_
QuantLib::ext::shared_ptr< QuantLib::YoYInflationCapFloor > yoyCapFloor_
The underlying YoY cap floor.
QuantLib::ext::shared_ptr< QuantLib::YoYInflationIndex > yoyIndex_
QuantLib::BusinessDayConvention yoyConvention_
void setPricingEngine(const QuantLib::ext::shared_ptr< QuantLib::PricingEngine > &engine)
Set the pricing engine to be used by the underlying YoY cap floor.
QuantLib::Handle< QuantLib::Quote > premium_
The market price quote for the YoY cap floor.
QuantLib::Calendar paymentCalendar_
void createCapFloor()
Create the underlying YoY cap floor.
QuantLib::Calendar yoyCalendar_
QuantLib::ext::shared_ptr< QuantLib::YoYInflationCapFloor > yoyCapFloor() const
yoyInflationLeg & withPaymentAdjustment(BusinessDayConvention)
yoyInflationLeg & withNotionals(Real notional)
yoyInflationLeg & withPaymentDayCounter(const DayCounter &)
Year on year inflation cap floor calibration helper.