cds option
financepy.products.credit.cds_option
Class
CDSOption
CDSOption(
expiry_dt: Date,
maturity_dt: Date,
strike_cpn: float,
notional: float = 1000000,
long_protection: bool = True,
knockout_flag: 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 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: Date,
issuer_curve: DiscountCurve,
volatility: float,
)
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: Date,
issuer_curve: DiscountCurve,
option_value,
)
Calculate the implied CDS option volatility from a price.
Functions
fvol
fvol(
volatility: float,
*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.