21#include <ql/quotes/simplequote.hpp>
23#include <boost/make_shared.hpp>
28 BusinessDayConvention fixConvention,
const Calendar& payCalendar,
29 BusinessDayConvention payConvention, Real strike,
30 const Handle<ZeroInflationIndex>& infIndex,
const Period& observationLag,
31 Real marketPremium, CPI::InterpolationType observationInterpolation,
32 BlackCalibrationHelper::CalibrationErrorType errorType)
35 instrument_(
QuantLib::ext::shared_ptr<CPICapFloor>(new CPICapFloor(
36 type, 1.0, Settings::instance().evaluationDate(), baseCPI, maturity, fixCalendar, fixConvention, payCalendar,
37 payConvention, strike, infIndex.currentLink(), observationLag, observationInterpolation))) {
38 QL_REQUIRE(errorType == BlackCalibrationHelper::PriceError ||
39 errorType == BlackCalibrationHelper::RelativePriceError,
40 "CpiCapFloorHelper supports only PriceError and "
41 "RelativePriceError error types");
42 marketValue_ = marketPremium;
QuantLib::ext::shared_ptr< PricingEngine > engine_
Real blackPrice(Volatility volatility) const override
Real modelValue() const override
QuantLib::ext::shared_ptr< CPICapFloor > instrument_
CpiCapFloorHelper(Option::Type type, Real baseCPI, const Date &maturity, const Calendar &fixCalendar, BusinessDayConvention fixConvention, const Calendar &payCalendar, BusinessDayConvention payConvention, Real strike, const Handle< ZeroInflationIndex > &infIndex, const Period &observationLag, Real marketPremium, CPI::InterpolationType observationInterpolation=CPI::AsIndex, BlackCalibrationHelper::CalibrationErrorType errorType=BlackCalibrationHelper::RelativePriceError)
CPI Cap Floor calibration helper.