CDS option. More...
#include <qle/instruments/cdsoption.hpp>
Classes | |
class | arguments |
Arguments for CDS-option calculation More... | |
class | engine |
base class for swaption engines More... | |
class | results |
Public Types | |
enum | StrikeType { Price , Spread } |
Public Member Functions | |
CdsOption (const QuantLib::ext::shared_ptr< CreditDefaultSwap > &swap, const QuantLib::ext::shared_ptr< Exercise > &exercise, bool knocksOut=true, const Real strike=Null< Real >(), const StrikeType strikeType=StrikeType::Spread) | |
Instrument interface | |
bool | isExpired () const override |
void | setupArguments (PricingEngine::arguments *) const override |
Inspectors | |
const QuantLib::ext::shared_ptr< CreditDefaultSwap > & | underlyingSwap () const |
Calculations | |
QuantLib::ext::shared_ptr< CreditDefaultSwap > | swap_ |
bool | knocksOut_ |
Real | strike_ |
StrikeType | strikeType_ |
Real | riskyAnnuity_ |
Rate | atmRate () const |
Real | riskyAnnuity () const |
Volatility | impliedVolatility (Real price, const Handle< QuantLib::YieldTermStructure > &termStructure, const Handle< DefaultProbabilityTermStructure > &, Real recoveryRate, Real accuracy=1.e-4, Size maxEvaluations=100, Volatility minVol=1.0e-7, Volatility maxVol=4.0) const |
void | setupExpired () const override |
void | fetchResults (const PricingEngine::results *) const override |
CDS option.
The side of the swaption is set by choosing the side of the CDS. A receiver CDS option is a right to buy an underlying CDS selling protection and receiving a coupon. A payer CDS option is a right to buy an underlying CDS buying protection and paying coupon.
Definition at line 67 of file cdsoption.hpp.
enum StrikeType |
CdsOption | ( | const QuantLib::ext::shared_ptr< CreditDefaultSwap > & | swap, |
const QuantLib::ext::shared_ptr< Exercise > & | exercise, | ||
bool | knocksOut = true , |
||
const Real | strike = Null<Real>() , |
||
const StrikeType | strikeType = StrikeType::Spread |
||
) |
Definition at line 85 of file cdsoption.cpp.
|
override |
Definition at line 92 of file cdsoption.cpp.
|
override |
Definition at line 99 of file cdsoption.cpp.
const QuantLib::ext::shared_ptr< CreditDefaultSwap > & underlyingSwap | ( | ) | const |
Definition at line 86 of file cdsoption.hpp.
Rate atmRate | ( | ) | const |
Definition at line 120 of file cdsoption.cpp.
Real riskyAnnuity | ( | ) | const |
Definition at line 122 of file cdsoption.cpp.
Volatility impliedVolatility | ( | Real | price, |
const Handle< QuantLib::YieldTermStructure > & | termStructure, | ||
const Handle< DefaultProbabilityTermStructure > & | , | ||
Real | recoveryRate, | ||
Real | accuracy = 1.e-4 , |
||
Size | maxEvaluations = 100 , |
||
Volatility | minVol = 1.0e-7 , |
||
Volatility | maxVol = 4.0 |
||
) | const |
Definition at line 128 of file cdsoption.cpp.
|
overrideprivate |
Definition at line 94 of file cdsoption.cpp.
|
overrideprivate |
Definition at line 113 of file cdsoption.cpp.
|
private |
Definition at line 99 of file cdsoption.hpp.
|
private |
Definition at line 100 of file cdsoption.hpp.
|
private |
Definition at line 101 of file cdsoption.hpp.
|
private |
Definition at line 102 of file cdsoption.hpp.
|
mutableprivate |
Definition at line 104 of file cdsoption.hpp.