FinancePy

FinancePy API Reference

cds curve

financepy.market.curves.cds_curve

Class

CDSCurve

CDSCurve( anchor_dt: Date, cds_contracts: list, libor_curve: DiscountCurve, recovery_rate: float, dc_type: DayCountTypes = <DayCountTypes.ACT_365F: 7>, interp_method: InterpTypes = <InterpTypes.FLAT_FWD_RATES: 1>, ) -> None
Generate a survival probability curve implied by the value of CDS contracts given a Ibor curve and an assumed recovery rate. The recovery rate corresponds to the seniority of the debt for these CDS. A scheme for the interpolation of the survival probabilities is also required.

Methods

set_times

set_times( self, times: <built-in function array>, )
Set the times vector

set_qs

set_qs( self, qvector: <built-in function array>, )
Set the survival probability curve

set_q

set_q( self, index, q, )
Set the survival probability at a specific index.

set_last_q

set_last_q( self, q, )
Set the survival probability factor at last index.

survival_prob

survival_prob( self, dt, )
Extract the survival probability to date dt. This function supports vectorisation.

df

df( self, dt, )
Extract the discount factor from the underlying Ibor curve. This function supports vectorisation.

build_curve

build_curve( self, )
Construct the CDS survival curve from a set of CDS contracts

fwd

fwd( self, fwd_dt: Date, )
Calculate the instantaneous forward rate at date fwd_dt using a numerical derivative.

zero_rate

zero_rate( self, dt, freq_type = <FrequencyTypes.CONTINUOUS: 99>, )
Calculate the zero rate to date dt in the chosen compounding frequency where -1 is continuous is the default.

Functions

f

f( q, *args, )
Function that returns zero when the survival probability that gives a zero value of the CDS has been determined.
Generated automatically from the FinancePy source code. Do not edit this file manually.