FinancePy

FinancePy API Reference

cds basket

financepy.products.credit.cds_basket

Class

CDSBasket

CDSBasket( step_in_dt: Date, maturity_dt: Date, num_credits: int, n_to_default: int, notional: float = 1000000, running_cpn: float = 0.0, long_protect: bool = True, freq_type: FrequencyTypes = <FrequencyTypes.QUARTERLY: 4>, accrual_dc_type: DayCountTypes = <DayCountTypes.ACT_360: 8>, cal_type: CalendarTypes | list | tuple = <CalendarTypes.WEEKEND: 2>, bd_type: BusDayAdjustTypes = <BusDayAdjustTypes.FOLLOWING: 2>, dg_type: DateGenRuleTypes = <DateGenRuleTypes.BACKWARD: 2>, ) -> None
Class to deal with n-to-default CDS baskets.

Methods

value_gaussian_mc

value_gaussian_mc( self, value_dt: Date, issuer_curves: list[financepy.market.curves.cds_curve.CDSCurve], corr_matrix: numpy.ndarray, num_trials: int, seed: int, use_moment_matching: bool = False, use_sobol: bool = False, )
Value the default basket using a Gaussian copula model. This depends on the issuer discount and correlation matrix.

value_student_t_mc

value_student_t_mc( self, value_dt: Date, issuer_curves: list[financepy.market.curves.cds_curve.CDSCurve], corr_matrix: numpy.ndarray, degrees_of_freedom: int, num_trials: int, seed: int, use_moment_matching: bool = False, use_sobol: bool = False, )
Value the default basket using the Student-T copula.

value_1f_gaussian_homo

value_1f_gaussian_homo( self, value_dt: Date, issuer_curves: list[financepy.market.curves.cds_curve.CDSCurve], beta_vector: numpy.ndarray, num_points: int = 25, )
Value default basket using 1 factor Gaussian copula and analytical approach which is only exact when all recovery rates are the same.

value_legs_mc

value_legs_mc( self, value_dt: Date, default_times: numpy.ndarray, issuer_curves: list[financepy.market.curves.cds_curve.CDSCurve], )
Vectorised MC valuation of n-to-default basket legs.

spread_dv01s

spread_dv01s( self, value_dt, issuer_curves, beta_vector, )

No description available.

Generated automatically from the FinancePy source code. Do not edit this file manually.