Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
indexcreditdefaultswap.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#pragma once
20
24
26
27namespace ore {
28namespace data {
29
31public:
32 //! Default constructor
33 IndexCreditDefaultSwap() : Trade("IndexCreditDefaultSwap") {}
34
35 //! Constructor
37 : Trade("IndexCreditDefaultSwap", env), swap_(swap), basket_(basket) {}
38
39 virtual void build(const QuantLib::ext::shared_ptr<EngineFactory>&) override;
40 QuantLib::Real notional() const override;
41
42 virtual void fromXML(XMLNode* node) override;
43 virtual XMLNode* toXML(ore::data::XMLDocument& doc) const override;
44
45 const IndexCreditDefaultSwapData& swap() const { return swap_; }
46
48
49 const std::map<std::string, QuantLib::Real>& constituents() const { return constituents_; };
50
51 const std::map<std::string,boost::any>& additionalData() const override;
52
53private:
56 //! map of all the constituents to notionals
57 std::map<std::string, QuantLib::Real> constituents_;
59};
60
61} // namespace data
62} // namespace ore
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
IndexCreditDefaultSwap(const Envelope &env, const IndexCreditDefaultSwapData &swap, const BasketData &basket)
Constructor.
const std::map< std::string, QuantLib::Real > & constituents() const
const IndexCreditDefaultSwapData & swap() const
CreditPortfolioSensitivityDecomposition sensitivityDecomposition() const
std::map< std::string, QuantLib::Real > constituents_
map of all the constituents to notionals
CreditPortfolioSensitivityDecomposition sensitivityDecomposition_
Trade base class.
Definition: trade.hpp:55
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
@ data
Definition: log.hpp:77
CreditPortfolioSensitivityDecomposition
Enumeration CreditPortfolioSensitivityDecomposition.
Definition: parsers.hpp:568
Serializable Credit Default Swap.
Definition: namespaces.docs:23
Reference data model and serialization.
base trade data model and serialization