23#ifndef quantext_cms_calibration_helper_h
24#define quantext_cms_calibration_helper_h
27#include <ql/indexes/swapindex.hpp>
28#include <ql/instruments/capfloor.hpp>
29#include <ql/models/calibrationhelper.hpp>
30#include <ql/patterns/lazyobject.hpp>
31#include <ql/quote.hpp>
32#include <ql/termstructures/yieldtermstructure.hpp>
39 CmsCapHelper(Date asof, QuantLib::ext::shared_ptr<SwapIndex>& index1, QuantLib::ext::shared_ptr<SwapIndex>& index2,
40 const Handle<YieldTermStructure>& yts,
const Handle<Quote>& price,
const Handle<Quote>& correlation,
41 const Period& length,
const Period& forwardStart,
const Period& spotDays,
const Period& cmsTenor,
42 Natural fixingDays,
const Calendar& calendar,
const DayCounter& daycounter,
43 const BusinessDayConvention& convention, QuantLib::ext::shared_ptr<FloatingRateCouponPricer>& pricer,
44 QuantLib::ext::shared_ptr<QuantLib::CmsCouponPricer>& cmsPricer)
66 QuantLib::ext::shared_ptr<SwapIndex>
index1_;
67 QuantLib::ext::shared_ptr<SwapIndex>
index2_;
81 QuantLib::ext::shared_ptr<FloatingRateCouponPricer>
pricer_;
82 QuantLib::ext::shared_ptr<QuantLib::CmsCouponPricer>
cmsPricer_;
85 mutable QuantLib::ext::shared_ptr<QuantLib::Swap>
cap_;
QuantLib::Real modelValue() const
returns the price of the instrument according to the model
Handle< Quote > correlation_
void performCalculations() const override
QuantLib::Real marketValue() const
returns the actual price of the instrument (from volatility)
Handle< YieldTermStructure > discountCurve_
CmsCapHelper(Date asof, QuantLib::ext::shared_ptr< SwapIndex > &index1, QuantLib::ext::shared_ptr< SwapIndex > &index2, const Handle< YieldTermStructure > &yts, const Handle< Quote > &price, const Handle< Quote > &correlation, const Period &length, const Period &forwardStart, const Period &spotDays, const Period &cmsTenor, Natural fixingDays, const Calendar &calendar, const DayCounter &daycounter, const BusinessDayConvention &convention, QuantLib::ext::shared_ptr< FloatingRateCouponPricer > &pricer, QuantLib::ext::shared_ptr< QuantLib::CmsCouponPricer > &cmsPricer)
QuantLib::ext::shared_ptr< FloatingRateCouponPricer > pricer_
BusinessDayConvention convention_
QuantLib::ext::shared_ptr< QuantLib::CmsCouponPricer > cmsPricer_
QuantLib::ext::shared_ptr< QuantLib::Swap > cap_
QuantLib::ext::shared_ptr< SwapIndex > index1_
QuantLib::ext::shared_ptr< SwapIndex > index2_
QuantLib::Real calibrationError() override
returns the error resulting from the model valuation
cms spread coupon pricer as in Brigo, Mercurio, 13.6.2, with extensions for shifted lognormal and nor...