Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
indexcreditdefaultswapoption.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 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/indexcreditdefaultswap.hpp
20\brief
21\ingroup portfolio
22*/
23
24#pragma once
25
27
29
32
33namespace ore {
34namespace data {
35
36//! Engine Builder base class for Index Credit Default Swap Options
37/*! Pricing engines are cached by the index CDS option trade's currency, the index CDS constituent credit curve IDs
38 and the index CDS credit curve ID. If the term of the underlying index CDS is provided, it is appended to the
39 index CDS credit curve ID also for the purposes of caching an engine.
40
41 \ingroup portfolio
42*/
43
45 : public ore::data::CachingPricingEngineBuilder<std::vector<std::string>, const QuantLib::Currency&,
46 const std::string&, const std::string&,
47 const std::vector<std::string>&> {
48public:
50
51protected:
52 IndexCreditDefaultSwapOptionEngineBuilder(const std::string& model, const std::string& engine)
53 : ore::data::CachingEngineBuilder<std::vector<std::string>, QuantLib::PricingEngine, const QuantLib::Currency&,
54 const std::string&, const std::string&, const std::vector<std::string>&>(
55 model, engine, {"IndexCreditDefaultSwapOption"}) {}
56
57 std::vector<std::string> keyImpl(const QuantLib::Currency& ccy, const std::string& creditCurveId,
58 const std::string& volCurveId,
59 const std::vector<std::string>& creditCurveIds) override;
60};
61
62//! Black CDS option engine builder for index CDS options.
63/*! This class creates a BlackIndexCdsOptionEngine
64 \ingroup portfolio
65*/
66
68public:
70 : IndexCreditDefaultSwapOptionEngineBuilder("Black", "BlackIndexCdsOptionEngine") {}
71
72protected:
73 virtual QuantLib::ext::shared_ptr<QuantLib::PricingEngine>
74 engineImpl(const QuantLib::Currency& ccy, const std::string& creditCurveId, const std::string& volCurveId,
75 const std::vector<std::string>& creditCurveIds) override;
76};
77
78//! Numerical Integration index CDS option engine.
80public:
82 : IndexCreditDefaultSwapOptionEngineBuilder("LognormalAdjustedIndexSpread", "NumericalIntegrationEngine") {}
83
84protected:
85 virtual QuantLib::ext::shared_ptr<QuantLib::PricingEngine>
86 engineImpl(const QuantLib::Currency& ccy, const std::string& creditCurveId, const std::string& volCurveId,
87 const std::vector<std::string>& creditCurveIds) override;
88};
89
90} // namespace data
91} // namespace ore
Abstract template engine builder class.
Black CDS option engine builder for index CDS options.
virtual QuantLib::ext::shared_ptr< QuantLib::PricingEngine > engineImpl(const QuantLib::Currency &ccy, const std::string &creditCurveId, const std::string &volCurveId, const std::vector< std::string > &creditCurveIds) override
Abstract template EngineBuilder class that can cache engines and coupon pricers.
const string & engine() const
Return the engine name.
const string & model() const
Return the model name.
Engine Builder base class for Index Credit Default Swap Options.
std::vector< std::string > keyImpl(const QuantLib::Currency &ccy, const std::string &creditCurveId, const std::string &volCurveId, const std::vector< std::string > &creditCurveIds) override
CreditPortfolioSensitivityDecomposition sensitivityDecomposition()
IndexCreditDefaultSwapOptionEngineBuilder(const std::string &model, const std::string &engine)
virtual QuantLib::ext::shared_ptr< QuantLib::PricingEngine > engineImpl(const QuantLib::Currency &ccy, const std::string &creditCurveId, const std::string &volCurveId, const std::vector< std::string > &creditCurveIds) override
Pricing Engine Factory.
@ data
Definition: log.hpp:77
CreditPortfolioSensitivityDecomposition
Enumeration CreditPortfolioSensitivityDecomposition.
Definition: parsers.hpp:568
Serializable Credit Default Swap.
Definition: namespaces.docs:23
Map text representations to QuantLib/QuantExt types.