Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
equityderivative.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2020 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 ORE is free software: you can redistribute it and/or modify it
8 under the terms of the Modified BSD License. You should have received a
9 copy of the license along with this program.
10 The license is also available online at <http://opensourcerisk.org>
11 This program is distributed on the basis that it will form a useful
12 contribution to risk analytics and model standardisation, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
15*/
16
17/*! \file ored/portfolio/equityderivative.hpp
18 \brief EQ base trade classes
19 \ingroup portfolio
20*/
21
22#pragma once
23
25#include <ored/portfolio/underlying.hpp> // For EquityUnderlying type
26
27namespace ore {
28namespace data {
29
30//! Base class for all Equity Derivaties
31class EquityDerivative : virtual public ore::data::Trade {
32protected:
33 EquityDerivative(const std::string& tradeType) : ore::data::Trade(tradeType) {}
34
35 EquityDerivative(const std::string& tradeType, ore::data::Envelope& env) : ore::data::Trade(tradeType, env) {}
36};
37
38//! Base class for all single asset Equity Derivaties
40protected:
42
43 EquitySingleAssetDerivative(const std::string& tradeType, ore::data::Envelope& env, const EquityUnderlying& equityUnderlying)
44 : ore::data::Trade(tradeType, env), EquityDerivative(tradeType, env), equityUnderlying_(equityUnderlying) {}
45
46 // Protected members
48
49public:
50 const string& equityName() const { return equityUnderlying_.name(); }
51};
52
53} // namespace data
54} // namespace oreplus
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
Base class for all Equity Derivaties.
EquityDerivative(const std::string &tradeType)
EquityDerivative(const std::string &tradeType, ore::data::Envelope &env)
Base class for all single asset Equity Derivaties.
EquitySingleAssetDerivative(const std::string &tradeType)
EquitySingleAssetDerivative(const std::string &tradeType, ore::data::Envelope &env, const EquityUnderlying &equityUnderlying)
const std::string & name() const override
Definition: underlying.hpp:109
Trade base class.
Definition: trade.hpp:55
const string & tradeType() const
Definition: trade.hpp:133
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
base trade data model and serialization
underlying data model