Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
cpicapfloor.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2020 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 ored/model/calibrationinstruments/cpicapfloor.hpp
20 \brief class for holding details of a zero coupon CPI cap floor calibration instrument.
21 \ingroup models
22*/
23
24#pragma once
25
29
30#include <ql/instruments/capfloor.hpp>
31
32#include <boost/variant.hpp>
33
34namespace ore {
35namespace data {
36
37/*! Class for holding details of a CPI cap floor calibration instrument.
38 \ingroup models
39*/
41public:
42 //! Default constructor
44
45 //! Detailed constructor
46 CpiCapFloor(QuantLib::CapFloor::Type type,
47 const boost::variant<QuantLib::Date, QuantLib::Period> & maturity,
48 const QuantLib::ext::shared_ptr<BaseStrike>& strike);
49
50 //! \name Inspectors
51 //@{
52 QuantLib::CapFloor::Type type() const;
53 const boost::variant<QuantLib::Date, QuantLib::Period>& maturity() const;
54 const QuantLib::ext::shared_ptr<BaseStrike>& strike() const;
55 //@}
56
57 //! \name Serialisation
58 //@{
59 void fromXML(XMLNode* node) override;
60 XMLNode* toXML(XMLDocument& doc) const override;
61 //@}
62
63private:
64 QuantLib::CapFloor::Type type_;
65 boost::variant<QuantLib::Date, QuantLib::Period> maturity_;
66 QuantLib::ext::shared_ptr<BaseStrike> strike_;
67};
68
69} // namespace data
70} // namespace ore
class for holding details of the calibration instruments for a model
factory for making calibration instruments.
CpiCapFloor(QuantLib::CapFloor::Type type, const boost::variant< QuantLib::Date, QuantLib::Period > &maturity, const QuantLib::ext::shared_ptr< BaseStrike > &strike)
Detailed constructor.
QuantLib::CapFloor::Type type_
Definition: cpicapfloor.hpp:64
QuantLib::ext::shared_ptr< BaseStrike > strike_
Definition: cpicapfloor.hpp:66
void fromXML(XMLNode *node) override
Definition: cpicapfloor.cpp:50
XMLNode * toXML(XMLDocument &doc) const override
Definition: cpicapfloor.cpp:57
const QuantLib::ext::shared_ptr< BaseStrike > & strike() const
Definition: cpicapfloor.cpp:48
boost::variant< QuantLib::Date, QuantLib::Period > maturity_
Definition: cpicapfloor.hpp:65
CpiCapFloor()
Default constructor.
Definition: cpicapfloor.cpp:30
const boost::variant< QuantLib::Date, QuantLib::Period > & maturity() const
Definition: cpicapfloor.cpp:44
QuantLib::CapFloor::Type type() const
Definition: cpicapfloor.cpp:40
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
@ data
Definition: log.hpp:77
Classes for representing a strike using various conventions.
Serializable Credit Default Swap.
Definition: namespaces.docs:23