Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
reportconfig.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2021 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/reportconfig.hpp
20 \brief md report and arbitrage check configuration
21 \ingroup configuration
22*/
23
24#pragma once
25
27
28#include <boost/optional.hpp>
29
30namespace ore {
31namespace data {
32
34public:
36 ReportConfig(const boost::optional<bool>& reportOnDeltaGrid, const boost::optional<bool>& reportOnMoneynessGrid,
37 const boost::optional<bool>& reportOnStrikeGrid, const boost::optional<bool>& reportOnStrikeSpreadGrid,
38 const boost::optional<std::vector<std::string>>& deltas,
39 const boost::optional<std::vector<Real>>& moneyness, const boost::optional<std::vector<Real>>& strikes,
40 const boost::optional<std::vector<Real>>& strikeSpreads,
41 const boost::optional<std::vector<Period>>& expiries,
42 const boost::optional<std::vector<Period>>& underlyingTenors)
47
48 const boost::optional<bool> reportOnDeltaGrid() const { return reportOnDeltaGrid_; }
49 const boost::optional<bool> reportOnMoneynessGrid() const { return reportOnMoneynessGrid_; }
50 const boost::optional<bool> reportOnStrikeGrid() const { return reportOnStrikeGrid_; }
51 const boost::optional<bool> reportOnStrikeSpreadGrid() const { return reportOnStrikeSpreadGrid_; }
52 const boost::optional<std::vector<std::string>>& deltas() const { return deltas_; }
53 const boost::optional<std::vector<Real>>& moneyness() const { return moneyness_; }
54 const boost::optional<std::vector<Real>>& strikes() const { return strikes_; }
55 const boost::optional<std::vector<Real>>& strikeSpreads() const { return strikeSpreads_; }
56 const boost::optional<std::vector<Period>>& expiries() const { return expiries_; }
57 const boost::optional<std::vector<Period>>& underlyingTenors() const { return underlyingTenors_; }
58
59 void fromXML(XMLNode* node) override;
60 XMLNode* toXML(XMLDocument& doc) const override;
61
62private:
63 boost::optional<bool> reportOnDeltaGrid_;
64 boost::optional<bool> reportOnMoneynessGrid_;
65 boost::optional<bool> reportOnStrikeGrid_;
66 boost::optional<bool> reportOnStrikeSpreadGrid_;
67
68 boost::optional<std::vector<std::string>> deltas_;
69 boost::optional<std::vector<Real>> moneyness_;
70 boost::optional<std::vector<Real>> strikes_;
71 boost::optional<std::vector<Real>> strikeSpreads_;
72 boost::optional<std::vector<Period>> expiries_;
73 boost::optional<std::vector<Period>> underlyingTenors_;
74};
75
76ReportConfig effectiveReportConfig(const ReportConfig& globalConfig, const ReportConfig& localConfig);
77
78} // namespace data
79} // namespace ore
boost::optional< std::vector< Real > > moneyness_
boost::optional< std::vector< Period > > expiries_
boost::optional< std::vector< std::string > > deltas_
const boost::optional< bool > reportOnDeltaGrid() const
const boost::optional< std::vector< Period > > & underlyingTenors() const
const boost::optional< std::vector< Real > > & strikes() const
boost::optional< bool > reportOnStrikeSpreadGrid_
boost::optional< bool > reportOnMoneynessGrid_
const boost::optional< std::vector< std::string > > & deltas() const
const boost::optional< bool > reportOnStrikeSpreadGrid() const
const boost::optional< bool > reportOnMoneynessGrid() const
const boost::optional< bool > reportOnStrikeGrid() const
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
const boost::optional< std::vector< Period > > & expiries() const
boost::optional< bool > reportOnStrikeGrid_
boost::optional< std::vector< Real > > strikes_
boost::optional< bool > reportOnDeltaGrid_
boost::optional< std::vector< Period > > underlyingTenors_
boost::optional< std::vector< Real > > strikeSpreads_
const boost::optional< std::vector< Real > > & moneyness() const
const boost::optional< std::vector< Real > > & strikeSpreads() const
ReportConfig(const boost::optional< bool > &reportOnDeltaGrid, const boost::optional< bool > &reportOnMoneynessGrid, const boost::optional< bool > &reportOnStrikeGrid, const boost::optional< bool > &reportOnStrikeSpreadGrid, const boost::optional< std::vector< std::string > > &deltas, const boost::optional< std::vector< Real > > &moneyness, const boost::optional< std::vector< Real > > &strikes, const boost::optional< std::vector< Real > > &strikeSpreads, const boost::optional< std::vector< Period > > &expiries, const boost::optional< std::vector< Period > > &underlyingTenors)
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Base class for all serializable classes.
Definition: xmlutils.hpp:101
@ data
Definition: log.hpp:77
ReportConfig effectiveReportConfig(const ReportConfig &globalConfig, const ReportConfig &localConfig)
Serializable Credit Default Swap.
Definition: namespaces.docs:23
XML utility functions.