Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
performanceoption_01.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2019 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 ored/portfolio/performanceoption_01.hpp
20 \brief performance option wrapper for scripted trade
21 \ingroup portfolio
22*/
23
24#pragma once
25
27
29
30namespace ore {
31namespace data {
32
33using namespace ore::data;
34
36public:
37 explicit PerformanceOption_01(const QuantLib::ext::shared_ptr<Conventions>& conventions = nullptr)
38 : ScriptedTrade("PerformanceOption_01") {}
39 PerformanceOption_01(const Envelope& env, const string& notionalAmount, const string& participationRate,
40 const string& valuationDate, const string& settlementDate,
41 const vector<QuantLib::ext::shared_ptr<Underlying>>& underlyings, const vector<string>& strikePrices,
42 const string& strike, const bool strikeIncluded, const string& position, const string& payCcy,
43 const QuantLib::ext::shared_ptr<Conventions>& conventions = nullptr)
44 : ScriptedTrade("PerformanceOption_01", env), notionalAmount_(notionalAmount),
45 participationRate_(participationRate), valuationDate_(valuationDate), settlementDate_(settlementDate),
46 underlyings_(underlyings), strikePrices_(strikePrices), strike_(strike), strikeIncluded_(strikeIncluded),
47 position_(position), payCcy_(payCcy) {
49 }
50 void build(const QuantLib::ext::shared_ptr<EngineFactory>&) override;
51 void setIsdaTaxonomyFields() override;
52 void fromXML(XMLNode* node) override;
53 XMLNode* toXML(XMLDocument& doc) const override;
54
55private:
56 void initIndices();
58 vector<QuantLib::ext::shared_ptr<Underlying>> underlyings_;
59 vector<string> strikePrices_;
60 string strike_;
61 bool strikeIncluded_ = true;
63};
64
65} // namespace data
66} // namespace ore
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
vector< QuantLib::ext::shared_ptr< Underlying > > underlyings_
PerformanceOption_01(const Envelope &env, const string &notionalAmount, const string &participationRate, const string &valuationDate, const string &settlementDate, const vector< QuantLib::ext::shared_ptr< Underlying > > &underlyings, const vector< string > &strikePrices, const string &strike, const bool strikeIncluded, const string &position, const string &payCcy, const QuantLib::ext::shared_ptr< Conventions > &conventions=nullptr)
PerformanceOption_01(const QuantLib::ext::shared_ptr< Conventions > &conventions=nullptr)
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
scripted trade data model
base trade data model and serialization