Cds Basket
financepy.products.credit.cds_basket
Classes
CDSBasket
CDSBasket(step_in_dt: financepy.utils.date.Date, maturity_dt: financepy.utils.date.Date, notional: float = 1000000, running_cpn: float = 0.0, long_protect: bool = True, freq_type: financepy.utils.frequency.FrequencyTypes = <FrequencyTypes.QUARTERLY: 4>, accrual_dc_type: financepy.utils.day_count.DayCountTypes = <DayCountTypes.ACT_360: 8>, cal_type: financepy.utils.calendar.CalendarTypes | list | tuple = <CalendarTypes.WEEKEND: 2>, bd_type: financepy.utils.calendar.BusDayAdjustTypes = <BusDayAdjustTypes.FOLLOWING: 2>, dg_type: financepy.utils.calendar.DateGenRuleTypes = <DateGenRuleTypes.BACKWARD: 2>)
Class to deal with n-to-default CDS baskets.
Methods
value_legs_mc_old
value_legs_mc_old(self, value_dt, n_to_default, default_times, issuer_curves, libor_curve)
Value the legs of the default basket using Monte Carlo. The default
times are an input so this valuation is not model dependent.
value_legs_mc
value_legs_mc(self, value_dt, n_to_default, default_times, issuer_curves, libor_curve)
Value the premium PV01 and protection legs of an n-to-default basket via
Monte Carlo `default_times` is (num_credits x num_trials) of default times
in YEARS from value_dt. The valuation is pathwise (no model dependence
beyond the given default times).
value_gaussian_mc
value_gaussian_mc(self, value_dt, n_to_default, issuer_curves, corr_matrix, libor_curve, num_trials, seed)
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, n_to_default, issuer_curves, corr_matrix, degrees_of_freedom, libor_curve, num_trials, seed)
Value the default basket using the Student-T copula.
value_1f_gaussian_homo
value_1f_gaussian_homo(self, value_dt, n_to_default, issuer_curves, beta_vector, libor_curve, num_points=50)
Value default basket using 1 factor Gaussian copula and analytical
approach which is only exact when all recovery rates are the same.
Generated automatically from the FinancePy source code.
Do not edit this file manually.