24#ifndef quantext_yoycapfloor_helper_hpp
25#define quantext_yoycapfloor_helper_hpp
27#include <ql/instruments/inflationcapfloor.hpp>
28#include <ql/models/calibrationhelper.hpp>
35class YoYCapFloorHelper :
public QuantLib::CalibrationHelper,
public QuantLib::Observer,
public QuantLib::Observable {
38 QuantLib::YoYInflationCapFloor::Type type,
39 QuantLib::Rate strike,
40 QuantLib::Natural settlementDays,
41 const QuantLib::Period& tenor,
42 const QuantLib::ext::shared_ptr<QuantLib::YoYInflationIndex>& yoyIndex,
43 const QuantLib::Period& observationLag,
44 const QuantLib::Calendar& yoyCalendar,
45 QuantLib::BusinessDayConvention yoyConvention,
46 const QuantLib::DayCounter& yoyDayCount,
47 const QuantLib::Calendar& paymentCalendar,
48 QuantLib::BusinessDayConvention paymentConvention,
49 const QuantLib::Period& yoyTenor = 1 * QuantLib::Years);
63 QuantLib::ext::shared_ptr<QuantLib::YoYInflationCapFloor>
yoyCapFloor()
const;
67 void setPricingEngine(
const QuantLib::ext::shared_ptr<QuantLib::PricingEngine>& engine);
83 QuantLib::ext::shared_ptr<QuantLib::YoYInflationCapFloor>
yoyCapFloor_;
86 QuantLib::ext::shared_ptr<QuantLib::PricingEngine>
engine_;
90 QuantLib::YoYInflationCapFloor::Type
type_;
94 QuantLib::ext::shared_ptr<QuantLib::YoYInflationIndex>
yoyIndex_;
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_
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