24#ifndef quantext_yoy_swap_helper_hpp
25#define quantext_yoy_swap_helper_hpp
27#include <ql/instruments/yearonyearinflationswap.hpp>
28#include <ql/models/calibrationhelper.hpp>
35class YoYSwapHelper :
public QuantLib::CalibrationHelper,
public QuantLib::Observer,
public QuantLib::Observable {
39 QuantLib::Natural settlementDays,
40 const QuantLib::Period& tenor,
41 const QuantLib::ext::shared_ptr<QuantLib::YoYInflationIndex>& yoyIndex,
42 const QuantLib::Handle<QuantLib::YieldTermStructure>& rateCurve,
43 const QuantLib::Period& observationLag,
44 const QuantLib::Calendar& yoyCalendar,
45 QuantLib::BusinessDayConvention yoyConvention,
46 const QuantLib::DayCounter& yoyDayCount,
47 const QuantLib::Calendar& fixedCalendar,
48 QuantLib::BusinessDayConvention fixedConvention,
49 const QuantLib::DayCounter& fixedDayCount,
50 const QuantLib::Calendar& paymentCalendar,
51 QuantLib::BusinessDayConvention paymentConvention,
52 const QuantLib::Period& fixedTenor = 1 * QuantLib::Years,
53 const QuantLib::Period& yoyTenor = 1 * QuantLib::Years);
67 QuantLib::ext::shared_ptr<QuantLib::YearOnYearInflationSwap>
yoySwap()
const;
71 void setPricingEngine(
const QuantLib::ext::shared_ptr<QuantLib::PricingEngine>& engine);
84 QuantLib::Handle<QuantLib::Quote>
rate_;
87 QuantLib::ext::shared_ptr<QuantLib::YearOnYearInflationSwap>
yoySwap_;
90 QuantLib::ext::shared_ptr<QuantLib::PricingEngine>
engine_;
96 QuantLib::ext::shared_ptr<QuantLib::YoYInflationIndex>
yoyIndex_;
97 QuantLib::Handle<QuantLib::YieldTermStructure>
rateCurve_;
QuantLib::DayCounter fixedDayCount_
QuantLib::Period observationLag_
QuantLib::Real modelRate() const
Return the model implied fair year on year rate.
QuantLib::ext::shared_ptr< QuantLib::PricingEngine > engine_
The pricing engine used to value the YoY swap.
QuantLib::BusinessDayConvention paymentConvention_
QuantLib::Period yoyTenor_
QuantLib::Period fixedTenor_
QuantLib::Real marketRate() const
Return the market fair year on year rate.
QuantLib::ext::shared_ptr< QuantLib::YearOnYearInflationSwap > yoySwap() const
QuantLib::Date evaluationDate_
QuantLib::ext::shared_ptr< QuantLib::YearOnYearInflationSwap > yoySwap_
The underlying YoY swap.
void createSwap()
Create the underlying YoY swap.
QuantLib::Real calibrationError() override
QuantLib::DayCounter yoyDayCount_
QuantLib::Natural settlementDays_
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 swap.
QuantLib::Calendar paymentCalendar_
QuantLib::BusinessDayConvention fixedConvention_
QuantLib::Handle< QuantLib::YieldTermStructure > rateCurve_
QuantLib::Calendar yoyCalendar_
QuantLib::Handle< QuantLib::Quote > rate_
The YoY market swap quote.
QuantLib::Calendar fixedCalendar_