Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
equityvolcurveconfig.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/equityvolcurveconfig.hpp
20 \brief Equity volatility curve configuration classes
21 \ingroup configuration
22*/
23
24#pragma once
25
32#include <ql/time/daycounters/actual365fixed.hpp>
33#include <ql/types.hpp>
34
35namespace ore {
36namespace data {
38using QuantLib::DayCounter;
39using QuantLib::Period;
40using std::string;
41using std::vector;
42
43//! Equity volatility structure configuration
44/*!
45 \ingroup configuration
46*/
48public:
49 //! \name Constructors/Destructors
50 //@{
51 //! Default constructor
53 //! Detailed constructor
54 EquityVolatilityCurveConfig(const string& curveID, const string& curveDescription, const string& currency,
55 const std::vector<QuantLib::ext::shared_ptr<VolatilityConfig>>& volatilityConfig,
56 const string& equityId = string(),
57 const string& dayCounter = "A365", const string& calendar = "NullCalendar",
59 const boost::optional<bool>& preferOutOfTheMoney = boost::none);
60 EquityVolatilityCurveConfig(const string& curveID, const string& curveDescription, const string& currency,
61 const QuantLib::ext::shared_ptr<VolatilityConfig>& volatilityConfig,
62 const string& equityId = string(),
63 const string& dayCounter = "A365", const string& calendar = "NullCalendar",
65 const boost::optional<bool>& preferOutOfTheMoney = boost::none);
66 //@}
67
68 //! \name Serialisation
69 //@{
70 void fromXML(XMLNode* node) override;
71 XMLNode* toXML(XMLDocument& doc) const override;
72 //@}
73
74 //! \name Inspectors
75 //@{
76 const string& equityId() const { return equityId_.empty() ? curveID_ : equityId_; }
77 const string& ccy() const { return parseCurrencyWithMinors(ccy_).code(); }
78 const string& dayCounter() const { return dayCounter_; }
79 const string& calendar() const { return calendar_; }
80 const std::vector<QuantLib::ext::shared_ptr<VolatilityConfig>>& volatilityConfig() const { return volatilityConfig_; }
81 const string quoteStem(const std::string& volType) const;
82 void populateQuotes();
83 bool isProxySurface();
85 const boost::optional<bool>& preferOutOfTheMoney() const {
87 }
88 const ReportConfig& reportConfig() const { return reportConfig_; }
89 //@}
90
91 //! \name Setters
92 //@{
93 string& ccy() { return ccy_; }
94 string& dayCounter() { return dayCounter_; }
95 //@}
96
97private:
99
100 string ccy_;
101 std::vector<QuantLib::ext::shared_ptr<VolatilityConfig>> volatilityConfig_;
102 string equityId_;
104 string calendar_;
106 boost::optional<bool> preferOutOfTheMoney_;
108
109 // Return a default solver configuration. Used by solverConfig() if solverConfig_ is empty.
111};
112} // namespace data
113} // 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
Equity volatility structure configuration.
const string quoteStem(const std::string &volType) const
const std::vector< QuantLib::ext::shared_ptr< VolatilityConfig > > & volatilityConfig() const
XMLNode * toXML(XMLDocument &doc) const override
std::vector< QuantLib::ext::shared_ptr< VolatilityConfig > > volatilityConfig_
const boost::optional< bool > & preferOutOfTheMoney() const
static OneDimSolverConfig defaultSolverConfig()
const ReportConfig & reportConfig() const
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Base curve configuration classes.
Currency parseCurrencyWithMinors(const string &s)
Convert text to QuantLib::Currency.
Definition: parsers.cpp:310
@ data
Definition: log.hpp:77
Market data representation.
Serializable Credit Default Swap.
Definition: namespaces.docs:23
Class for holding 1-D solver configuration.
Map text representations to QuantLib/QuantExt types.
md report and arbitrage check configuration