Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
cdsvolcurveconfig.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 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/configuration/cdsvolcurveconfig.hpp
20 \brief CDS and index CDS volatility configuration
21 \ingroup configuration
22*/
23
24#pragma once
25
26#include <ql/shared_ptr.hpp>
29
30namespace ore {
31namespace data {
32
33/*! CDS and index CDS volatility configuration
34
35 \ingroup configuration
36*/
38public:
39 //! Default constructor
41
42 //! Detailed constructor
43 CDSVolatilityCurveConfig(const std::string& curveId, const std::string& curveDescription,
44 const QuantLib::ext::shared_ptr<VolatilityConfig>& volatilityConfig,
45 const std::string& dayCounter = "A365", const std::string& calendar = "NullCalendar",
46 const std::string& strikeType = "", const std::string& quoteName = "",
47 QuantLib::Real strikeFactor = 1.0, const std::vector<QuantLib::Period>& terms = {},
48 const std::vector<std::string>& termCurves = {});
49
50 //! \name Inspectors
51 //@{
52 const QuantLib::ext::shared_ptr<VolatilityConfig>& volatilityConfig() const;
53 const std::string& dayCounter() const;
54 const std::string& calendar() const;
55 const std::string& strikeType() const;
56 const std::string& quoteName() const;
57 QuantLib::Real strikeFactor() const;
58 const std::vector<QuantLib::Period>& terms() const;
59 const std::vector<std::string>& termCurves() const;
60 //@}
61
62 //! \name Serialisation
63 //@{
64 void fromXML(XMLNode* node) override;
66 //@}
67
68private:
69 QuantLib::ext::shared_ptr<VolatilityConfig> volatilityConfig_;
70 std::string dayCounter_;
71 std::string calendar_;
72 std::string strikeType_;
73 std::string quoteName_;
74 QuantLib::Real strikeFactor_;
75 std::vector<QuantLib::Period> terms_;
76 std::vector<std::string> termCurves_;
77
78 //! Populate CurveConfig::quotes_ with the required quotes.
79 void populateQuotes();
80
81 //! Populate required curve ids
83
84 //! Give back the quote stem used in construction of the quote strings
85 std::string quoteStem() const;
86};
87
88} // namespace data
89} // namespace ore
const std::string & strikeType() const
void populateRequiredCurveIds()
Populate required curve ids.
const std::vector< QuantLib::Period > & terms() const
void populateQuotes()
Populate CurveConfig::quotes_ with the required quotes.
QuantLib::ext::shared_ptr< VolatilityConfig > volatilityConfig_
const std::string & quoteName() const
const std::vector< std::string > & termCurves() const
CDSVolatilityCurveConfig(const std::string &curveId, const std::string &curveDescription, const QuantLib::ext::shared_ptr< VolatilityConfig > &volatilityConfig, const std::string &dayCounter="A365", const std::string &calendar="NullCalendar", const std::string &strikeType="", const std::string &quoteName="", QuantLib::Real strikeFactor=1.0, const std::vector< QuantLib::Period > &terms={}, const std::vector< std::string > &termCurves={})
Detailed constructor.
CDSVolatilityCurveConfig()
Default constructor.
void fromXML(XMLNode *node) override
std::vector< std::string > termCurves_
ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
std::vector< QuantLib::Period > terms_
std::string quoteStem() const
Give back the quote stem used in construction of the quote strings.
const std::string & dayCounter() const
const std::string & calendar() const
const QuantLib::ext::shared_ptr< VolatilityConfig > & volatilityConfig() const
Base curve configuration.
Definition: curveconfig.hpp:41
const string & curveDescription() const
Definition: curveconfig.hpp:55
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Base curve configuration classes.
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23