Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
inflationcurveconfig.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/*!
20 \file ored/configuration/inflationcurveconfig.hpp
21 \brief Inflation curve config
22 \ingroup configuration
23*/
24
25#pragma once
26
28#include <ql/time/calendar.hpp>
29#include <ql/time/daycounter.hpp>
30#include <ql/time/frequency.hpp>
31#include <ql/time/period.hpp>
32#include <ql/types.hpp>
33
34namespace ore {
35namespace data {
38using QuantLib::Date;
39using QuantLib::DayCounter;
40using QuantLib::Frequency;
41using QuantLib::Period;
42using std::string;
43using std::vector;
44
46public:
47 enum class Type { ZC, YY };
48
50 InflationCurveConfig(const string& curveID, const string& curveDescription, const string& nominalTermStructure,
51 const Type type, const vector<string>& quotes, const string& conventions,
52 const bool extrapolate, const Calendar& calendar, const DayCounter& dayCounter,
53 const Period& lag, const Frequency& frequency, const Real baseRate, const Real tolerance,
55 const Frequency& seasonalityFrequency, const vector<string>& seasonalityFactors,
56 const vector<double>& overrideSeasonalityFactors = std::vector<double>());
57
58 void fromXML(XMLNode* node) override;
59 XMLNode* toXML(XMLDocument& doc) const override;
60
61 // Inspectors
62 const string& nominalTermStructure() const { return nominalTermStructure_; }
63 const Type& type() const { return type_; }
64 const string& conventions() const { return conventions_; }
65 const bool& extrapolate() const { return extrapolate_; }
66 const Calendar& calendar() const { return calendar_; }
67 const DayCounter& dayCounter() const { return dayCounter_; }
68 const Period& lag() const { return lag_; }
69 const Frequency& frequency() const { return frequency_; }
70 const Real& baseRate() const { return baseRate_; }
71 const Real& tolerance() const { return tolerance_; }
73 const Date& seasonalityBaseDate() const { return seasonalityBaseDate_; }
74 const Frequency& seasonalityFrequency() const { return seasonalityFrequency_; }
75 const vector<string>& seasonalityFactors() const { return seasonalityFactors_; }
76 const vector<double>& overrideSeasonalityFactors() const { return overrideSeasonalityFactors_; }
77 const vector<string>& swapQuotes() { return swapQuotes_; }
78
79 // Setters
81 Type& type() { return type_; }
82 string& conventions() { return conventions_; }
83 bool& extrapolate() { return extrapolate_; }
84 Calendar& calendar() { return calendar_; }
85 DayCounter& dayCounter() { return dayCounter_; }
86 Period& lag() { return lag_; }
87 Frequency& frequency() { return frequency_; }
88 Real& baseRate() { return baseRate_; }
89 Real& tolerance() { return tolerance_; }
93 vector<string>& seasonalityFactors() { return seasonalityFactors_; }
95
96private:
98
99 vector<string> swapQuotes_;
105 Calendar calendar_;
106 DayCounter dayCounter_;
107 Period lag_;
108 Frequency frequency_;
114 vector<string> seasonalityFactors_;
116};
117} // namespace data
118} // namespace ore
Base curve configuration.
Definition: curveconfig.hpp:41
const string & curveDescription() const
Definition: curveconfig.hpp:55
const string & curveID() const
Definition: curveconfig.hpp:54
virtual const vector< string > & quotes()
Return all the market quotes required for this config.
Definition: curveconfig.hpp:69
const bool & useLastAvailableFixingAsBaseDate() const
const DayCounter & dayCounter() const
const string & nominalTermStructure() const
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
const vector< string > & seasonalityFactors() const
const Frequency & seasonalityFrequency() const
vector< double > & overrideSeasonalityFactors()
const vector< double > & overrideSeasonalityFactors() const
const vector< string > & swapQuotes()
const Frequency & frequency() const
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