QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
Public Types | Public Member Functions | List of all members
IsdaCdsEngine Class Reference

#include <ql/pricingengines/credit/isdacdsengine.hpp>

Inherits CreditDefaultSwap::engine.

Public Types

enum  NumericalFix { None, Taylor }
 
enum  AccrualBias { HalfDayBias, NoBias }
 
enum  ForwardsInCouponPeriod { Flat, Piecewise }
 

Public Member Functions

 IsdaCdsEngine (const Handle< DefaultProbabilityTermStructure > &probability, Real recoveryRate, const Handle< YieldTermStructure > &discountCurve, const boost::optional< bool > &includeSettlementDateFlows=boost::none, NumericalFix numericalFix=Taylor, AccrualBias accrualBias=HalfDayBias, ForwardsInCouponPeriod forwardsInCouponPeriod=Piecewise)
 
Handle< YieldTermStructureisdaRateCurve () const
 
Handle< DefaultProbabilityTermStructureisdaCreditCurve () const
 
void calculate () const
 

Detailed Description

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

Member Enumeration Documentation

◆ 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.

Constructor & Destructor Documentation

◆ IsdaCdsEngine()

IsdaCdsEngine ( const Handle< DefaultProbabilityTermStructure > &  probability,
Real  recoveryRate,
const Handle< YieldTermStructure > &  discountCurve,
const boost::optional< bool > &  includeSettlementDateFlows = boost::none,
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 static bool IborCoupon::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.