Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
equityfuturesoption.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
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/equityfuturesoption.hpp
20 \brief EQ Futures Option data model and serialization
21 \ingroup portfolio
22*/
23
24#pragma once
25
28
29namespace ore {
30namespace data {
31using std::string;
32using namespace ore::data;
33
34//! Serializable EQ Futures Option
35/*!
36 \ingroup tradedata
37*/
39public:
40
41 //! Default constructor
43 //! Constructor
45 const QuantLib::ext::shared_ptr<ore::data::Underlying>& underlying, TradeStrike strike, QuantLib::Date forwardDate,
46 const QuantLib::ext::shared_ptr<QuantLib::Index>& index = nullptr, const std::string& indexName = "");
47
48 //! Build QuantLib/QuantExt instrument, link pricing engine
49 void build(const QuantLib::ext::shared_ptr<EngineFactory>&) override;
50
51 //! \name Inspectors
52 //@{
53 const std::string& name() const { return underlying_->name(); }
54 const QuantLib::ext::shared_ptr<ore::data::Underlying>& underlying() const { return underlying_; }
55 //@}
56
57 //! \name Serialisation
58 //@{
59 virtual void fromXML(XMLNode* node) override;
60 virtual XMLNode* toXML(XMLDocument& doc) const override;
61 //@}
62
63 //! Add underlying Equity names
64 std::map<AssetClass, std::set<std::string>>
65 underlyingIndices(const QuantLib::ext::shared_ptr<ReferenceDataManager>& referenceDataManager = nullptr) const override;
66
67private:
68 QuantLib::ext::shared_ptr<ore::data::Underlying> underlying_;
69
70};
71} // namespace data
72} // namespace ore
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
Serializable EQ Futures Option.
QuantLib::ext::shared_ptr< ore::data::Underlying > underlying_
const std::string & name() const
std::map< AssetClass, std::set< std::string > > underlyingIndices(const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr) const override
Add underlying Equity names.
const QuantLib::ext::shared_ptr< ore::data::Underlying > & underlying() const
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
EquityFutureOption()
Default constructor.
void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Build QuantLib/QuantExt instrument, link pricing engine.
Serializable object holding option data.
Definition: optiondata.hpp:42
string tradeType_
Definition: trade.hpp:196
Serializable Vanilla Option.
const string & currency() const
const OptionData & option() const
TradeStrike strike() const
const QuantLib::Date forwardDate() const
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
trade option data model and serialization
vanilla option representation