Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
fxdoublebarrieroption.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 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/fxdoublebarrieroption.hpp
18 \brief FX Double Barrier Option data model and serialization
19 \ingroup portfolio
20*/
21
22#pragma once
23
25
26namespace ore {
27namespace data {
28using std::string;
29
30//! Serializable FX Double Barrier Option
31/*!
32 \ingroup tradedata
33*/
35public:
36 //! Default constructor
37 FxDoubleBarrierOption() : ore::data::Trade("FxDoubleBarrierOption"), FxOptionWithBarrier("") {}
38
39 //! Constructor
41 string calendar, string boughtCurrency, QuantLib::Real boughtAmount, string soldCurrency,
42 QuantLib::Real soldAmount, string fxIndex = "")
43 : ore::data::Trade("FxDoubleBarrierOption", env), FxOptionWithBarrier("", env, option,
45
46 void checkBarriers() override;
47
48 //! create the pricing engines
49 QuantLib::ext::shared_ptr<QuantLib::PricingEngine>
50 vanillaPricingEngine(const QuantLib::ext::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
51 const QuantLib::Date& paymentDate = QuantLib::Date()) override;
52 QuantLib::ext::shared_ptr<QuantLib::PricingEngine>
53 barrierPricingEngine(const QuantLib::ext::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
54 const QuantLib::Date& paymentDate = QuantLib::Date()) override;
55};
56} // namespace data
57} // namespace oreplus
Barrier Option data model and serialization.
Serializable obejct holding barrier data.
Definition: barrierdata.hpp:34
const BarrierData & barrier() const
const QuantLib::Date & startDate() const
const ore::data::OptionData & option() const
const QuantLib::Calendar & calendar() const
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
Serializable FX Double Barrier Option.
QuantLib::ext::shared_ptr< QuantLib::PricingEngine > barrierPricingEngine(const QuantLib::ext::shared_ptr< EngineFactory > &ef, const QuantLib::Date &expiryDate, const QuantLib::Date &paymentDate=QuantLib::Date()) override
QuantLib::ext::shared_ptr< QuantLib::PricingEngine > vanillaPricingEngine(const QuantLib::ext::shared_ptr< EngineFactory > &ef, const QuantLib::Date &expiryDate, const QuantLib::Date &paymentDate=QuantLib::Date()) override
create the pricing engines
FxDoubleBarrierOption(Envelope &env, OptionData option, BarrierData barrier, QuantLib::Date startDate, string calendar, string boughtCurrency, QuantLib::Real boughtAmount, string soldCurrency, QuantLib::Real soldAmount, string fxIndex="")
Constructor.
void checkBarriers() override
check validity of barriers
QuantLib::Real boughtAmount() const
QuantLib::Real soldAmount() const
const std::string & soldCurrency() const
const std::string & boughtCurrency() const
Serializable object holding option data.
Definition: optiondata.hpp:42
Trade base class.
Definition: trade.hpp:55
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23