Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
blackcdsoptionengine.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 qle/pricingengines/blackcdsoptionengine.hpp
20 \brief Black credit default swap option engine.
21 \ingroup engines
22*/
23
24#ifndef quantext_black_cds_option_engine_hpp
25#define quantext_black_cds_option_engine_hpp
26
27#include <ql/termstructures/yieldtermstructure.hpp>
30
31namespace QuantExt {
32
33/*! Black single name CDS option engine
34
35 Prices single name CDS option instruments quoted in terms of strike spread. It is assumed that the volatility
36 structure's strike dimension, if there is one, is in terms of spread also. This is the standard situation for
37 single name CDS options.
38
39 The valuation follows the approach outlined in <em>Modeling Single-name and Multi-name Credit Derivatives,
40 Dominic O'Kane, 2008, Section 9.3.7</em>. This is also the approach in <em>A CDS Option Miscellany, Richard
41 J. Martin, 2019, Section 2.1 and 2.2</em>. If we need the approach in Section 2.4 of that paper, we would need
42 to make adjustments to the forward spread and RPV01 in our calculation which may in turn need access to the ISDA
43 supplied interest rate curve. We leave that as a possible future enhancement.
44*/
46public:
47 BlackCdsOptionEngine(const QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>& probability,
48 QuantLib::Real recovery,
49 const QuantLib::Handle<QuantLib::YieldTermStructure>& discount,
50 const QuantLib::Handle<QuantExt::CreditVolCurve>& volatility);
51
52 //! \name Inspectors
53 //@{
54 const QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>& probability() const;
55 QuantLib::Real recovery() const;
56 const QuantLib::Handle<QuantLib::YieldTermStructure> discount() const;
57 const QuantLib::Handle<QuantExt::CreditVolCurve> volatility() const;
58 //@}
59
60 //! \name Instrument interface
61 //@{
62 void calculate() const override;
63 //@}
64
65private:
66 QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure> probability_;
67 QuantLib::Real recovery_;
68 QuantLib::Handle<QuantLib::YieldTermStructure> discount_;
69 QuantLib::Handle<QuantExt::CreditVolCurve> volatility_;
70};
71
72}
73
74#endif
CDS option, removed requirements (rec must knock out, no upfront amount), that should be taken care o...
const QuantLib::Handle< QuantLib::YieldTermStructure > discount() const
QuantLib::Handle< QuantLib::DefaultProbabilityTermStructure > probability_
const QuantLib::Handle< QuantExt::CreditVolCurve > volatility() const
QuantLib::Handle< QuantLib::YieldTermStructure > discount_
QuantLib::Handle< QuantExt::CreditVolCurve > volatility_
const QuantLib::Handle< QuantLib::DefaultProbabilityTermStructure > & probability() const
base class for swaption engines
Definition: cdsoption.hpp:130
credit vol curve