Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
creditdefaultswap.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 portfolio/creditdefaultswap.hpp
20 \brief Ibor cap, floor or collar trade data model and serialization
21 \ingroup tradedata
22 */
23
24#pragma once
25
28
29//! Serializable Credit Default Swap
30/*!
31 \ingroup tradedata
32 */
33namespace ore {
34namespace data {
35
36class CreditDefaultSwap : public Trade {
37public:
38 //! Default constructor
39 CreditDefaultSwap() : Trade("CreditDefaultSwap") {}
40
41 //xg! Constructor
43 : Trade("CreditDefaultSwap", env), swap_(swap) {}
44
45 virtual void build(const QuantLib::ext::shared_ptr<EngineFactory>&) override;
46 QuantLib::Real notional() const override;
47
48 virtual void fromXML(XMLNode* node) override;
49 virtual XMLNode* toXML(XMLDocument& doc) const override;
50
51 const CreditDefaultSwapData& swap() const { return swap_; }
52
53 const std::map<std::string,boost::any>& additionalData() const override;
54
55private:
57};
58
59} // namespace data
60} // namespace ore
const CreditDefaultSwapData & swap() const
CreditDefaultSwap()
Default constructor.
CreditDefaultSwap(const Envelope &env, const CreditDefaultSwapData &swap)
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
Trade base class.
Definition: trade.hpp:55
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
A class to hold credit default swap data.
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
base trade data model and serialization