Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
europeanoptionbarrier.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2021 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/europeanoptionbarrier.hpp
20 \brief European option with barrier wrapper for scripted trade
21 \ingroup portfolio
22*/
23
24#pragma once
25
28
29namespace ore {
30namespace data {
31
32using namespace ore::data;
33
35public:
36 explicit EuropeanOptionBarrier(const QuantLib::ext::shared_ptr<Conventions>& conventions = nullptr)
37 : ScriptedTrade("EuropeanOptionBarrier") {}
38 EuropeanOptionBarrier(const Envelope& env, const string& quantity, const string& putCall, const string& longShort,
39 const string& strike, const string& premiumAmount, const string& premiumCurrency,
40 const string& premiumDate, const string& optionExpiry,
41 const QuantLib::ext::shared_ptr<Underlying>& optionUnderlying,
42 const QuantLib::ext::shared_ptr<Underlying>& barrierUnderlying, const string& barrierLevel,
43 const string& barrierType, const string& barrierStyle, const string& settlementDate,
44 const string& payCcy, const ScheduleData& barrierSchedule,
45 const QuantLib::ext::shared_ptr<Conventions>& conventions = nullptr)
46 : ScriptedTrade("EuropeanOptionBarrier", env), quantity_(quantity), putCall_(putCall), longShort_(longShort),
47 strike_(strike), premiumAmount_(premiumAmount), premiumCurrency_(premiumCurrency), premiumDate_(premiumDate),
48 optionExpiry_(optionExpiry), optionUnderlying_(optionUnderlying), barrierUnderlying_(barrierUnderlying),
49 barrierLevel_(barrierLevel), barrierType_(barrierType), barrierStyle_(barrierStyle),
50 barrierSchedule_(barrierSchedule), settlementDate_(settlementDate), payCcy_(payCcy) {
52 }
53 void build(const QuantLib::ext::shared_ptr<EngineFactory>&) override;
54 void fromXML(XMLNode* node) override;
55 XMLNode* toXML(XMLDocument& doc) const override;
56
57private:
58 void initIndices();
60 QuantLib::ext::shared_ptr<Underlying> optionUnderlying_, barrierUnderlying_;
64};
65
66} // namespace data
67} // namespace ore
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
QuantLib::ext::shared_ptr< Underlying > barrierUnderlying_
QuantLib::ext::shared_ptr< Underlying > optionUnderlying_
EuropeanOptionBarrier(const Envelope &env, const string &quantity, const string &putCall, const string &longShort, const string &strike, const string &premiumAmount, const string &premiumCurrency, const string &premiumDate, const string &optionExpiry, const QuantLib::ext::shared_ptr< Underlying > &optionUnderlying, const QuantLib::ext::shared_ptr< Underlying > &barrierUnderlying, const string &barrierLevel, const string &barrierType, const string &barrierStyle, const string &settlementDate, const string &payCcy, const ScheduleData &barrierSchedule, const QuantLib::ext::shared_ptr< Conventions > &conventions=nullptr)
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
EuropeanOptionBarrier(const QuantLib::ext::shared_ptr< Conventions > &conventions=nullptr)
void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Serializable schedule data.
Definition: schedule.hpp:202
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