Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
modeldata.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/modeldata.hpp
20 \brief base class for holding model data
21 \ingroup models
22*/
23
24#pragma once
25
29#include <ql/types.hpp>
30
31namespace ore {
32namespace data {
33
34/*! Abstract base class for holding model data.
35 \ingroup models
36*/
37class ModelData : public XMLSerializable {
38
39public:
40 //! Default constructor
41 ModelData();
42
43 //! Detailed constructor
45 const std::vector<CalibrationBasket>& calibrationBaskets);
46
47 //! \name Inspectors
48 //@{
50 const std::vector<CalibrationBasket>& calibrationBaskets() const;
51 //@}
52
53 //! \name Serialisation
54 //@{
55 void fromXML(XMLNode* node) override;
56 //@}
57
58private:
60
61protected:
62 //! Method used by toXML in derived classes to add the members here to a node.
63 virtual void append(XMLDocument& doc, XMLNode* node) const;
64
65 // Protected so that we can support population from legacy XML in fromXML in derived classes.
66 std::vector<CalibrationBasket> calibrationBaskets_;
67};
68
69}
70}
class for holding details of the calibration instruments for a model
CalibrationType calibrationType_
Definition: modeldata.hpp:59
CalibrationType calibrationType() const
Definition: modeldata.cpp:34
virtual void append(XMLDocument &doc, XMLNode *node) const
Method used by toXML in derived classes to add the members here to a node.
Definition: modeldata.cpp:56
void fromXML(XMLNode *node) override
Definition: modeldata.cpp:42
std::vector< CalibrationBasket > calibrationBaskets_
Definition: modeldata.hpp:66
ModelData()
Default constructor.
Definition: modeldata.cpp:27
const std::vector< CalibrationBasket > & calibrationBaskets() const
Definition: modeldata.cpp:38
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Base class for all serializable classes.
Definition: xmlutils.hpp:101
Linear Gauss Markov model data.
@ data
Definition: log.hpp:77
CalibrationType
Supported calibration types.
Definition: irmodeldata.hpp:46
Serializable Credit Default Swap.
Definition: namespaces.docs:23
XML utility functions.