Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
creditsimulationparameters.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 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 aggregation/creditsimulationparameters.hpp
20 \brief Credit simulation parameter class
21 \ingroup engine
22*/
23
24#pragma once
25
27
28#include <ql/math/matrix.hpp>
29
30using QuantLib::Array;
31using QuantLib::Matrix;
32using QuantLib::Size;
33using std::string;
34
35namespace ore {
36using namespace data;
37namespace analytics {
38
39//! Credit simulation description
40/*! \ingroup engine
41 */
43public:
44 //! Default constructor
46
47 //! \name Inspectors
48 //@
49 const std::map<string, Matrix>& transitionMatrix() const { return transitionMatrix_; }
50 const std::vector<string>& entities() const { return entities_; }
51 const std::vector<Array>& factorLoadings() const { return factorLoadings_; }
52 const std::vector<string>& transitionMatrices() const { return transitionMatrices_; }
53 const std::vector<Size>& initialStates() const { return initialStates_; }
54 bool marketRisk() const { return marketRisk_; }
55 bool creditRisk() const { return creditRisk_; }
56 bool zeroMarketPnl() const { return zeroMarketPnl_; }
57 const string& evaluation() const { return evaluation_; }
58 bool doubleDefault() const { return doubleDefault_; }
59 Size seed() const { return seed_; }
60 Size paths() const { return paths_; }
61 const std::string& creditMode() const { return creditMode_; }
62 const std::string& loanExposureMode() const { return loanExposureMode_; }
63 const std::vector<string>& nettingSetIds() const { return nettingSetIds_; }
64 //@}
65
66 //! \name Setters
67 //@{
68 std::map<string, Matrix>& transitionMatrix() { return transitionMatrix_; }
69 std::vector<string>& entities() { return entities_; }
70 std::vector<Array>& factorLoadings() { return factorLoadings_; }
71 std::vector<string>& transitionMatrices() { return transitionMatrices_; }
72 std::vector<Size>& initialStates() { return initialStates_; }
73 bool& marketRisk() { return marketRisk_; }
74 bool& creditRisk() { return creditRisk_; }
75 bool& zeroMarketPnl() { return zeroMarketPnl_; }
76 string& evaluation() { return evaluation_; }
77 bool& doubleDefault() { return doubleDefault_; }
78 Size& seed() { return seed_; }
79 Size& paths() { return paths_; }
80 std::string& creditMode() { return creditMode_; }
81 std::string& loanExposureMode() { return loanExposureMode_; }
82 std::vector<string>& nettingSetIds() { return nettingSetIds_; }
83 //@}
84
85 //! \name Serialisation
86 //@{
87 virtual void fromXML(XMLNode* node);
88 virtual XMLNode* toXML(XMLDocument& doc)const ;
89 //@}
90
91 //! \Equality Operators
92 //@{
93 // bool operator==(const CreditSimulationParameters& rhs);
94 // bool operator!=(const CreditSimulationParameters& rhs);
95 //@}
96
97private:
98 std::map<string, Matrix> transitionMatrix_;
99 std::vector<string> entities_;
100 std::vector<Array> factorLoadings_;
101 std::vector<string> transitionMatrices_;
102 std::vector<Size> initialStates_;
111 std::vector<string> nettingSetIds_;
112};
113} // namespace analytics
114} // namespace ore
const std::vector< Array > & factorLoadings() const
virtual XMLNode * toXML(XMLDocument &doc) const
const std::vector< string > & transitionMatrices() const
const std::vector< string > & nettingSetIds() const
const std::vector< string > & entities() const
const std::vector< Size > & initialStates() const
const std::map< string, Matrix > & transitionMatrix() const
std::map< string, Matrix > transitionMatrix_
\Equality Operators
data