Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
bestentryoption.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2022 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#pragma once
20
23
24namespace ore {
25namespace data {
26
28public:
29 explicit BestEntryOption(const string& tradeType = "BestEntryOption") : ScriptedTrade(tradeType) {}
30 BestEntryOption(const Envelope& env, const string& longShort, const string& notional, const string& multiplier,
31 const string& strike, const string& cap, const string& resetMinimum, const string& triggerLevel,
32 const QuantLib::ext::shared_ptr<Underlying> underlying, const string& currency,
33 const ScheduleData& observationDates, const string& premiumDate)
34 : longShort_(longShort), notional_(notional), multiplier_(multiplier), strike_(strike), cap_(cap),
35 resetMinimum_(resetMinimum), triggerLevel_(triggerLevel), underlying_(underlying), currency_(currency),
36 observationDates_(observationDates), premiumDate_(premiumDate) {
38 }
39 void build(const QuantLib::ext::shared_ptr<EngineFactory>&) override;
40 // This is called within ScriptedTrade::build()
41 void setIsdaTaxonomyFields() override;
42 void fromXML(XMLNode* node) override;
43 XMLNode* toXML(XMLDocument& doc) const override;
44
45private:
46 void initIndices();
47
50 QuantLib::ext::shared_ptr<Underlying> underlying_;
51 std::string currency_;
55};
56
58public:
59 EquityBestEntryOption() : BestEntryOption("EquityBestEntryOption") {}
60};
61
63public:
64 FxBestEntryOption() : BestEntryOption("FxBestEntryOption") {}
65};
66
68public:
69 CommodityBestEntryOption() : BestEntryOption("CommodityBestEntryOption") {}
70};
71
72} // namespace data
73} // namespace ore
std::string strike_
void initIndices()
std::string resetMinimum_
void setIsdaTaxonomyFields() override
std::string currency_
std::string strikeDate_
std::string longShort_
std::string triggerLevel_
BestEntryOption(const Envelope &env, const string &longShort, const string &notional, const string &multiplier, const string &strike, const string &cap, const string &resetMinimum, const string &triggerLevel, const QuantLib::ext::shared_ptr< Underlying > underlying, const string &currency, const ScheduleData &observationDates, const string &premiumDate)
std::string cap_
void fromXML(XMLNode *node) override
QuantLib::ext::shared_ptr< Underlying > underlying_
XMLNode * toXML(XMLDocument &doc) const override
BestEntryOption(const string &tradeType="BestEntryOption")
std::string premiumDate_
ScheduleData observationDates_
std::string premium_
std::string multiplier_
std::string settlementDate_
std::string notional_
std::string expiryDate_
void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
CommodityBestEntryOption()
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
EquityBestEntryOption()
FxBestEntryOption()
Serializable schedule data.
Definition: schedule.hpp:202
QuantLib::Real notional() const override
Return the current notional in npvCurrency. See individual sub-classes for the precise definition.
const string & tradeType() const
Definition: trade.hpp:133
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