Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
equityswap.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2018 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/equityswap.hpp
20 \brief Equity Swap data model and serialization
21 \ingroup tradedata
22*/
23
24#pragma once
25
28
29namespace ore {
30namespace data {
31using std::string;
32
33//! Serializable Equity Swap contract
34/*!
35\ingroup tradedata
36*/
37class EquitySwap : public Swap {
38public:
39 //! Default constructor
40 EquitySwap() : Swap("EquitySwap") {}
41
42 //! Constructor with vector of LegData
43 EquitySwap(const Envelope& env, const vector<LegData>& legData);
44
45 //! Constructor with two legs
46 EquitySwap(const Envelope& env, const LegData& leg0, const LegData& leg1);
47
48 void checkEquitySwap(const vector<LegData>& legData);
49
50 //! Trade interface
51 virtual void build(const QuantLib::ext::shared_ptr<EngineFactory>&) override;
52 void setIsdaTaxonomyFields() override;
53 QuantLib::Real notional() const override;
54 std::string notionalCurrency() const override;
55
56private:
58};
59} // namespace data
60} // namespace ore
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
Serializable Equity Swap contract.
Definition: equityswap.hpp:37
std::string notionalCurrency() const override
Definition: equityswap.cpp:143
void setIsdaTaxonomyFields() override
Definition: equityswap.cpp:120
QuantLib::Real notional() const override
Return the current notional in npvCurrency. See individual sub-classes for the precise definition.
Definition: equityswap.cpp:131
void checkEquitySwap(const vector< LegData > &legData)
Definition: equityswap.cpp:33
EquitySwap()
Default constructor.
Definition: equityswap.hpp:40
virtual void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Trade interface.
Definition: equityswap.cpp:48
Serializable object holding leg data.
Definition: legdata.hpp:844
Serializable Swap, Single and Cross Currency.
Definition: swap.hpp:36
const vector< LegData > & legData() const
Definition: swap.hpp:74
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
Swap trade data model and serialization.
base trade data model and serialization