Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
inflationcapfloorvolcurveconfig.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2018 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/inflationcapfloorvolcurveconfig.hpp
20 \brief Inflation CapFloor volatility curve configuration class
21 \ingroup configuration
22*/
23
24#pragma once
25
27#include <ql/time/calendar.hpp>
28#include <ql/time/daycounter.hpp>
29#include <ql/time/period.hpp>
30#include <ql/types.hpp>
31
32namespace ore {
33namespace data {
34
36using QuantLib::BusinessDayConvention;
38using QuantLib::DayCounter;
39using QuantLib::Natural;
40using QuantLib::Period;
41using std::string;
42using std::vector;
43
44//! Inflation CapFloor volatility curve configuration class
45/*! \ingroup configuration
46 */
48public:
49 enum class Type { ZC, YY };
51 enum class QuoteType { Price, Volatility };
52
55 const string& curveID, const string& curveDescription, const Type type, const QuoteType& quoteType,
56 const VolatilityType& volatilityType, const bool extrapolate, const vector<string>& tenors,
57 const vector<string>& capStrikes, const vector<string>& floorStrikes, const vector<string>& strikes,
58 const DayCounter& dayCounter, Natural settleDays, const Calendar& calendar,
59 const BusinessDayConvention& businessDayConvention, const string& index, const string& indexCurve,
60 const string& yieldTermStructure, const Period& observationLag, const std::string& quoteIndex = "",
61 const std::string& conventions = "", const bool useLastAvailableFixingDate = false);
62
63 //! \name XMLSerializable interface
64 //@{
65 void fromXML(XMLNode* node) override;
66 XMLNode* toXML(XMLDocument& doc) const override;
67 //@}
68
69 //! \name Inspectors
70 //@{
71 const Type& type() const { return type_; }
72 const QuoteType& quoteType() const { return quoteType_; }
74 const bool& extrapolate() const { return extrapolate_; }
75 const vector<string>& tenors() const { return tenors_; }
76 const vector<string>& strikes() const { return strikes_; }
77 const vector<string>& capStrikes() const { return capStrikes_; }
78 const vector<string>& floorStrikes() const { return floorStrikes_; }
79 const DayCounter& dayCounter() const { return dayCounter_; }
80 const Natural& settleDays() const { return settleDays_; }
81 const Calendar& calendar() const { return calendar_; }
82 const BusinessDayConvention& businessDayConvention() const { return businessDayConvention_; }
83 const string& index() const { return index_; }
84 const string& indexCurve() const { return indexCurve_; }
85 const string& yieldTermStructure() const { return yieldTermStructure_; }
86 const vector<string>& quotes() override;
87 const Period& observationLag() const { return observationLag_; }
88 const std::string& quoteIndex() const { return quoteIndex_; }
89 const std::string& conventions() const { return conventions_; }
91 //@}
92
93 //! \name Setters
94 //@{
95 Type& type() { return type_; }
98 bool& extrapolate() { return extrapolate_; }
99 vector<string>& tenors() { return tenors_; }
100 vector<string>& strikes() { return strikes_; }
101 vector<string>& capStrikes() { return capStrikes_; }
102 vector<string>& floorStrikes() { return floorStrikes_; }
103 DayCounter& dayCounter() { return dayCounter_; }
104 Natural& settleDays() { return settleDays_; }
105 Calendar& calendar() { return calendar_; }
106 string& index() { return index_; }
107 string& indexCurve() { return indexCurve_; }
109 Period& observationLag() { return observationLag_; }
110 std::string& quoteIndex() { return quoteIndex_; }
111 std::string& conventions() { return conventions_; }
113 //@}
114
115private:
117
122 vector<string> tenors_;
123 vector<string> capStrikes_; // price surfaces with different strikes for cap and floor premia
124 vector<string> floorStrikes_; // price surfaces with different strikes for cap and floor premia
125 vector<string> strikes_; // union of cap and floor strikes
126 DayCounter dayCounter_;
127 Natural settleDays_;
128 Calendar calendar_;
129 BusinessDayConvention businessDayConvention_;
130 string index_;
134 // Can be different from the index_ string to allow the surface to be configured against another index's quotes.
135 std::string quoteIndex_;
136 std::string conventions_;
138};
139
141std::ostream& operator<<(std::ostream& out, InflationCapFloorVolatilityCurveConfig::QuoteType t);
142
143} // namespace data
144} // 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
Inflation CapFloor volatility curve configuration class.
const vector< string > & quotes() override
Return all the market quotes required for this config.
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Base curve configuration classes.
@ data
Definition: log.hpp:77
std::ostream & operator<<(std::ostream &out, EquityReturnType t)
Serializable Credit Default Swap.
Definition: namespaces.docs:23