FinancePy

FinancePy API Reference

Cds Option

financepy.products.credit.cds_option

Classes

CDSOption

CDSOption(expiry_dt: financepy.utils.date.Date, maturity_dt: financepy.utils.date.Date, strike_cpn: float, notional: float = 1000000, long_protection: bool = True, knockout_flag: 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 manage the pricing and risk-management of an option on a single-name CDS. This is a contract in which the option buyer pays for an option to either buy or sell protection on the underlying CDS at a fixed spread agreed today and to be exercised in the future on a specified expiry date. The option may or may not cancel if there is a credit event before option expiry. This needs to be specified.

Methods

value

value(self, value_dt, issuer_curve, volatility)
Value the CDS option using Black's model with an adjustment for any Front End Protection. TODO - Should the CDS be created in the init method ?

implied_volatility

implied_volatility(self, value_dt, issuer_curve, option_value)
Calculate the implied CDS option volatility from a price.

Functions

fvol

fvol(volatility, *args)
Root searching function in the calculation of the CDS implied volatility.
Generated automatically from the FinancePy source code. Do not edit this file manually.