Cds Index Portfolio
financepy.products.credit.cds_index_portfolio
Classes
CDSIndexPortfolio
CDSIndexPortfolio(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 = <CalendarTypes.WEEKEND: 2>, bd_type: financepy.utils.calendar.BusDayAdjustTypes = <BusDayAdjustTypes.FOLLOWING: 2>, dg_type: financepy.utils.calendar.DateGenRuleTypes = <DateGenRuleTypes.BACKWARD: 2>)
This class manages the calculations associated with an equally weighted
portfolio of CDS contracts with the same maturity date.
Methods
intrinsic_rpv01
intrinsic_rpv01(self, value_dt, step_in_dt, maturity_dt, issuer_curves)
Calculation of the risky PV01 of the CDS portfolio by taking the
average of the risky PV01s of each contract.
intrinsic_prot_leg_pv
intrinsic_prot_leg_pv(self, value_dt, step_in_dt, maturity_dt, issuer_curves)
Calculation of intrinsic protection leg value of the CDS portfolio
by taking the average sum the protection legs of each contract.
intrinsic_spread
intrinsic_spread(self, value_dt, step_in_dt, maturity_dt, issuer_curves)
Calculation of the intrinsic spd of the CDS portfolio as the one
which would make the value of the protection legs equal to the value of
the premium legs if all premium legs paid the same spd.
average_spread
average_spread(self, value_dt, step_in_dt, maturity_dt, issuer_curves)
Calculates the average par CDS spd of the CDS portfolio.
total_spread
total_spread(self, value_dt, step_in_dt, maturity_dt, issuer_curves)
Calculates the total CDS spd of the CDS portfolio by summing
over all of the issuers and adding the spd with no weights.
min_spread
min_spread(self, value_dt, step_in_dt, maturity_dt, issuer_curves)
Calculates the minimum par CDS spd across all of the issuers in
the CDS portfolio.
max_spread
max_spread(self, value_dt, step_in_dt, maturity_dt, issuer_curves)
Calculates the maximum par CDS spd across all of the issuers in
the CDS portfolio.
spread_adjust_intrinsic
spread_adjust_intrinsic(self, value_dt, issuer_curves, index_cpns, index_upfronts, index_maturity_dts, index_recovery_rate, tolerance=1e-07)
Adjust individual CDS discount to reprice CDS index prices.
This approach uses an iterative scheme but is slow as it has to use a
CDS curve bootstrap required when each trial spd adjustment is made
hazard_rate_adjust_intrinsic
hazard_rate_adjust_intrinsic(self, value_dt, issuer_curves, index_cpns, index_up_fronts, index_maturity_dts, index_recovery_rate, tolerance=1e-07, max_iterations=500)
Adjust individual CDS discount to reprice CDS index prices.
This approach adjusts the hazard rates and so avoids the slowish
CDS curve bootstrap required when a spd adjustment is made.
Generated automatically from the FinancePy source code.
Do not edit this file manually.