Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
fxoption.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016-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/*! \file portfolio/builders/fxoption.hpp
20 \brief Engine builder for FX Options
21 \ingroup builders
22*/
23
24#pragma once
25
28
29namespace ore {
30namespace data {
31
32//! Engine Builder for European Fx Option Options
33/*! Pricing engines are cached by currency pair/currency
34
35 \ingroup builders
36 */
38public:
40};
41
42/*! Engine builder for European cash-settled FX options.
43 \ingroup builders
44 */
46public:
48 : EuropeanCSOptionEngineBuilder("GarmanKohlhagen", {"FxOptionEuropeanCS"}, AssetClass::FX) {}
49};
50
51//! Engine Builder for American Fx Options using Finite Difference Method
52/*! Pricing engines are cached by currency pair
53
54 \ingroup builders
55 */
57public:
59 : AmericanOptionFDEngineBuilder("GarmanKohlhagen", {"FxOptionAmerican"}, AssetClass::FX, expiryDate_) {}
60};
61
62//! Engine Builder for American Fx Options using Barone Adesi Whaley Approximation
63/*! Pricing engines are cached by currency pair
64
65 \ingroup builders
66 */
68public:
70 : AmericanOptionBAWEngineBuilder("GarmanKohlhagen", {"FxOptionAmerican"}, AssetClass::FX) {}
71};
72
73//! FX option engine builder for external cam, with additional simulation dates (AMC)
75public:
76 // for external cam, with additional simulation dates (AMC)
77 CamAmcFxOptionEngineBuilder(const QuantLib::ext::shared_ptr<QuantExt::CrossAssetModel>& cam,
78 const std::vector<Date>& simulationDates)
79 : VanillaOptionEngineBuilder("CrossAssetModel", "AMC", {"FxOption"}, AssetClass::FX, Date()), cam_(cam),
80 simulationDates_(simulationDates) {}
81
82protected:
83 // the pricing engine depends on the ccys only, so the base class key implementation will just do fine
84 QuantLib::ext::shared_ptr<PricingEngine> engineImpl(const string& assetName, const Currency& ccy,
85 const AssetClass& assetClassUnderlying, const Date& expiryDate, const bool useFxSpot) override;
86
87private:
88 const QuantLib::ext::shared_ptr<QuantExt::CrossAssetModel> cam_;
89 const std::vector<Date> simulationDates_;
90};
91
92} // namespace data
93} // namespace ore
Abstract engine builders for European and American Options.
Abstract Engine Builder for American Vanilla Options using Barone Adesi Whaley Approximation.
Abstract Engine Builder for American Vanilla Options using Finite Difference Method.
FX option engine builder for external cam, with additional simulation dates (AMC)
Definition: fxoption.hpp:74
const std::vector< Date > simulationDates_
Definition: fxoption.hpp:89
QuantLib::ext::shared_ptr< PricingEngine > engineImpl(const string &assetName, const Currency &ccy, const AssetClass &assetClassUnderlying, const Date &expiryDate, const bool useFxSpot) override
Definition: fxoption.cpp:35
const QuantLib::ext::shared_ptr< QuantExt::CrossAssetModel > cam_
Definition: fxoption.hpp:88
CamAmcFxOptionEngineBuilder(const QuantLib::ext::shared_ptr< QuantExt::CrossAssetModel > &cam, const std::vector< Date > &simulationDates)
Definition: fxoption.hpp:77
Abstract Engine Builder for European Vanilla Options.
Engine Builder for American Fx Options using Barone Adesi Whaley Approximation.
Definition: fxoption.hpp:67
Engine Builder for American Fx Options using Finite Difference Method.
Definition: fxoption.hpp:56
Engine Builder for European Fx Option Options.
Definition: fxoption.hpp:37
Abstract Engine Builder for Vanilla Options.
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23