Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
cpicapfloorhelper.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file cpicapfloorhelper.hpp
20 \brief CPI Cap Floor calibration helper
21 \ingroup models
22*/
23
24#ifndef quantext_cpicapfloor_calibration_helper_hpp
25#define quantext_cpicapfloor_calibration_helper_hpp
26
27#include <ql/instruments/cpicapfloor.hpp>
28#include <ql/models/calibrationhelper.hpp>
29
30namespace QuantExt {
31using namespace QuantLib;
32
33/* Note that calibration helpers that are not based on a implied volatility but directly on
34 a premium are part of QL PR 18 */
35//! CPI cap floor helper
36/*!
37 \ingroup models
38*/
40public:
42 Option::Type type, Real baseCPI, const Date& maturity, const Calendar& fixCalendar,
43 BusinessDayConvention fixConvention, const Calendar& payCalendar, BusinessDayConvention payConvention,
44 Real strike, const Handle<ZeroInflationIndex>& infIndex, const Period& observationLag, Real marketPremium,
45 CPI::InterpolationType observationInterpolation = CPI::AsIndex,
46 BlackCalibrationHelper::CalibrationErrorType errorType = BlackCalibrationHelper::RelativePriceError);
47
48 Real modelValue() const override;
49 Real blackPrice(Volatility volatility) const override;
50 void addTimesTo(std::list<Time>&) const override {}
51
52 QuantLib::ext::shared_ptr<CPICapFloor> instrument() const { return instrument_; }
53
54private:
55 QuantLib::ext::shared_ptr<CPICapFloor> instrument_;
56};
57
58} // namespace QuantExt
59
60#endif
Real blackPrice(Volatility volatility) const override
Real modelValue() const override
QuantLib::ext::shared_ptr< CPICapFloor > instrument_
QuantLib::ext::shared_ptr< CPICapFloor > instrument() const
void addTimesTo(std::list< Time > &) const override