QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <isdacdsengine.hpp>
Public Types | |
enum | NumericalFix { None , Taylor } |
enum | AccrualBias { HalfDayBias , NoBias } |
enum | ForwardsInCouponPeriod { Flat , Piecewise } |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Public Member Functions | |
IsdaCdsEngine (Handle< DefaultProbabilityTermStructure > probability, Real recoveryRate, Handle< YieldTermStructure > discountCurve, const ext::optional< bool > &includeSettlementDateFlows=ext::nullopt, NumericalFix numericalFix=Taylor, AccrualBias accrualBias=HalfDayBias, ForwardsInCouponPeriod forwardsInCouponPeriod=Piecewise) | |
Handle< YieldTermStructure > | isdaRateCurve () const |
Handle< DefaultProbabilityTermStructure > | isdaCreditCurve () const |
void | calculate () const override |
Public Member Functions inherited from GenericEngine< CreditDefaultSwap::arguments, CreditDefaultSwap::results > | |
PricingEngine::arguments * | getArguments () const override |
const PricingEngine::results * | getResults () const override |
void | reset () override |
void | update () override |
Public Member Functions inherited from PricingEngine | |
~PricingEngine () override=default | |
virtual arguments * | getArguments () const =0 |
virtual const results * | getResults () const =0 |
virtual void | reset ()=0 |
virtual void | calculate () const =0 |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
void | registerWithObservables (const ext::shared_ptr< Observer > &) |
Size | unregisterWith (const ext::shared_ptr< Observable > &) |
void | unregisterWithAll () |
virtual void | update ()=0 |
virtual void | deepUpdate () |
Private Attributes | |
Handle< DefaultProbabilityTermStructure > | probability_ |
const Real | recoveryRate_ |
Handle< YieldTermStructure > | discountCurve_ |
const ext::optional< bool > | includeSettlementDateFlows_ |
const NumericalFix | numericalFix_ |
const AccrualBias | accrualBias_ |
const ForwardsInCouponPeriod | forwardsInCouponPeriod_ |
Additional Inherited Members | |
Protected Attributes inherited from GenericEngine< CreditDefaultSwap::arguments, CreditDefaultSwap::results > | |
CreditDefaultSwap::arguments | arguments_ |
CreditDefaultSwap::results | results_ |
References:
[1] The Pricing and Risk Management of Credit Default Swaps, with a Focus on the ISDA Model, OpenGamma Quantitative Research, Version as of 15-Oct-2013
[2] ISDA CDS Standard Model Proposed Numerical Fix \ Thursday, November 15, 2012, Markit
[3] Markit Interest Rate Curve XML Specifications, Version 1.16, Tuesday, 15 October 2013
Definition at line 49 of file isdacdsengine.hpp.
enum NumericalFix |
According to [1] the settings for the flags AccrualBias / ForwardsInCouponPeriod corresponding to the standard model implementation C code are
prior 1.8.2 HalfDayBias / Flat 1.8.2 NoBias / Flat
The theoretical correct setting would be NoBias / Piecewise
Todo: Clarify in which version of the standard model implementation C code the numerical problem of zero denominators is solved and how exactly.
Enumerator | |
---|---|
None | |
Taylor |
Definition at line 66 of file isdacdsengine.hpp.
enum AccrualBias |
Enumerator | |
---|---|
HalfDayBias | |
NoBias |
Definition at line 73 of file isdacdsengine.hpp.
Enumerator | |
---|---|
Flat | |
Piecewise |
Definition at line 79 of file isdacdsengine.hpp.
IsdaCdsEngine | ( | Handle< DefaultProbabilityTermStructure > | probability, |
Real | recoveryRate, | ||
Handle< YieldTermStructure > | discountCurve, | ||
const ext::optional< bool > & | includeSettlementDateFlows = ext::nullopt , |
||
NumericalFix | numericalFix = Taylor , |
||
AccrualBias | accrualBias = HalfDayBias , |
||
ForwardsInCouponPeriod | forwardsInCouponPeriod = Piecewise |
||
) |
Constructor where the client code is responsible for providing a default curve and an interest rate curve compliant with the ISDA specifications.
To be precisely consistent with the ISDA specification bool IborCoupon::Settings::usingAtParCoupons(); must be true. This is not checked in order not to kill the engine completely in this case.
Furthermore, the ibor index in the swap rate helpers should not provide the evaluation date's fixing.
Definition at line 36 of file isdacdsengine.cpp.
Handle< YieldTermStructure > isdaRateCurve | ( | ) | const |
Definition at line 106 of file isdacdsengine.hpp.
Handle< DefaultProbabilityTermStructure > isdaCreditCurve | ( | ) | const |
Definition at line 107 of file isdacdsengine.hpp.
|
overridevirtual |
Implements PricingEngine.
Definition at line 52 of file isdacdsengine.cpp.
|
private |
Definition at line 112 of file isdacdsengine.hpp.
|
private |
Definition at line 113 of file isdacdsengine.hpp.
|
private |
Definition at line 114 of file isdacdsengine.hpp.
|
private |
Definition at line 115 of file isdacdsengine.hpp.
|
private |
Definition at line 116 of file isdacdsengine.hpp.
|
private |
Definition at line 117 of file isdacdsengine.hpp.
|
private |
Definition at line 118 of file isdacdsengine.hpp.