Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
equityeuropeanbarrieroption.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 ORE is free software: you can redistribute it and/or modify it
8 under the terms of the Modified BSD License. You should have received a
9 copy of the license along with this program.
10 The license is also available online at <http://opensourcerisk.org>
11 This program is distributed on the basis that it will form a useful
12 contribution to risk analytics and model standardisation, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
15*/
16
17/*! \file ored/portfolio/equityeuropeanbarrieroption.hpp
18 \brief EQ European Barrier Option data model and serialization
19 \ingroup portfolio
20*/
21
22#pragma once
23
25
29#include <ql/instruments/barriertype.hpp>
30
31namespace ore {
32namespace data {
33using std::string;
34
35//! Serializable EQ European Barrier Option
36/*!
37 \ingroup tradedata
38*/
40public:
41 //! Default constructor
43 //! Constructor
45 EquityUnderlying equityUnderlying, string currency, TradeStrike strike, double quantity)
46 : EquityOption(env, option, equityUnderlying, currency, quantity, strike), barrier_(barrier) {}
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 BarrierData& barrier() const { return barrier_; }
54 //@}
55
56 //! \name Serialisation
57 //@{
58 virtual void fromXML(XMLNode* node) override;
59 virtual XMLNode* toXML(XMLDocument& doc) const override;
60 //@}
61private:
63};
64} // namespace data
65} // namespace oreplus
Serializable obejct holding barrier data.
Definition: barrierdata.hpp:34
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
Serializable EQ European Barrier Option.
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
EquityEuropeanBarrierOption(Envelope &env, OptionData option, BarrierData barrier, EquityUnderlying equityUnderlying, string currency, TradeStrike strike, double quantity)
Constructor.
void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Build QuantLib/QuantExt instrument, link pricing engine.
Serializable Equity Option.
Serializable object holding option data.
Definition: optiondata.hpp:42
const string & currency() const
const OptionData & option() const
TradeStrike strike() const
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Equity Option data model and serialization.
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
trade option data model and serialization
base trade data model and serialization