Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
inflationmodeldata.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/inflation/inflationmodeldata.hpp
20 \brief base class for holding inflation model data
21 \ingroup models
22*/
23
24#pragma once
25
27#include <string>
28
29namespace ore {
30namespace data {
31
32/*! Abstract base class for holding inflation model data.
33 \ingroup models
34*/
36
37public:
38 //! Default constructor. The currency and inflation index are empty.
40
41 /*! Detailed constructor populating the currency and inflation index.
42 \param calibrationType the type of model calibration.
43 \param calibrationBaskets the calibration baskets for the model.
44 \param currency the currency of the inflation model.
45 \param index the name of the inflation index being modeled.
46 \param ignoreDuplicateCalibrationExpiryTimes if true, a calibration instrument
47 with an expiry time equal to that of a previously added instrument
48 is skipped. If false, an error is thrown if such an instrument is found.
49 Notice that two instruments with different option expiry dates can
50 still have the same expiry time due to the way dates are converted
51 to times for inflation instruments.
52 */
54 const std::vector<CalibrationBasket>& calibrationBaskets,
55 const std::string& currency,
56 const std::string& index,
58
59 //! \name Inspectors
60 //@{
61 const std::string& currency() const;
62 const std::string& index() const;
64 //@}
65
66 //! \name Serialisation
67 //@{
68 void fromXML(XMLNode* node) override;
69 //@}
70
71protected:
72 //! Method used by toXML in derived classes to add the members here to a node.
73 void append(XMLDocument& doc, XMLNode* node) const override;
74
75private:
76 std::string currency_;
77 std::string index_;
79};
80
81}
82}
void append(XMLDocument &doc, XMLNode *node) const override
Method used by toXML in derived classes to add the members here to a node.
const std::string & index() const
const std::string & currency() const
bool ignoreDuplicateCalibrationExpiryTimes() const
void fromXML(XMLNode *node) override
InflationModelData()
Default constructor. The currency and inflation index are empty.
CalibrationType calibrationType() const
Definition: modeldata.cpp:34
const std::vector< CalibrationBasket > & calibrationBaskets() const
Definition: modeldata.cpp:38
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
@ data
Definition: log.hpp:77
base class for holding model data
CalibrationType
Supported calibration types.
Definition: irmodeldata.hpp:46
Serializable Credit Default Swap.
Definition: namespaces.docs:23