CDS_Functions

FunctionIt equals the flat hazard rate that would cause the given CDS to have the quoted price.

The Implied Hazard Rate price calculation is based on the Model[CDS]::Pricing Method::Mid Point Cds method.

Note this method performs the calculation with the instrument characteristics.

It will coincide with the ISDA calculation if your object has the standard characteristics. Notably:

- The calendar should have no bank holidays, just weekends.

- The yield curve should be LIBOR piecewise constant in fwd rates, with a discount factor of 1 on the calculation date, which coincides with the trade date.

- Convention should be Following for yield curve and contract cashflows.

- The CDS should pay accrued and mature on standard IMM dates, settle on trade date +1 and upfront settle on trade date +3.

Function

First the implied hazard rate for a target NPV = 0 is calculated using the CDS::Implied Hazard Rate function.

Then a credit curve is constructed taking as input a flat hazard rate equal to the one found above.

Finally the fair spread (i.e. the running premium that makes the CDS have zero price) is calculated and returned.

The CDS price calculation is based on the Model[CDS]::Pricing Method::Mid Point Cds method.

Note this method performs the calculation with the instrument characteristics.

It will coincide with the ISDA calculation if your object has the standard characteristics. Notably:

- The calendar should have no bank holidays, just weekends.

- The yield curve should be LIBOR piecewise constant in fwd rates, with a discount factor of 1 on the calculation date, which coincides with the trade date.

- Convention should be Following for yield curve and contract cashflows.

- The CDS should pay accrued and mature on standard IMM dates, settle on trade date +1 and upfront settle on trade date +3.