quantlib.instruments.credit_default_swap.CreditDefaultSwap.from_upfront¶
- classmethod CreditDefaultSwap.from_upfront(cls, Protection side, double notional, double upfront, double spread, Schedule schedule, BusinessDayConvention payment_convention, DayCounter day_counter, bool settles_accrual=True, bool pays_at_default_time=True, Date protection_start=Date(), Date upfront_date=Date(), DayCounter last_period_day_counter=Actual360(True), bool rebates_accrual=True, Date trade_date=Date(), Natural cash_settlement_days=3)¶
Credit default swap quoted as upfront and running spread
- Parameters:
- sideint or {BUYER, SELLER}
Whether the protection is bought or sold.
- notionalfloat
Notional value
- uprontfloat
Upfront payment in fractional units.
- spreadfloat
Running spread in fractional units.
- schedule
Schedule
Coupon schedule.
- payment_conventionint
Business-day convention for payment-date adjustment.
- day_counter
DayCounter
Day-count convention for accrual.
- settles_accrualbool, optional
Whether or not the accrued coupon is due in the event of a default.
- pays_at_default_timebool, optional
If set to True, any payments triggered by a default event are due at default time. If set to False, they are due at the end of the accrual period.
- protection_start
Date
, optional The first date where a default event will trigger the contract.
- upfront_date
Date
, optional Settlement date for the upfront and accrual rebate (if any) payments. Typically T+3, this is also the default value.
- last_period_day_counter
DayCounter
, optional Day-count convention for accrual in last period
- rebates_accrualbool, optional
The protection seller pays the accrued scheduled current coupon at the start of the contract. The rebate date is not provided but computed to be two days after protection start.
- trade_date
Date
The contract’s trade date. It will be used with the cash_settlement_days to determine the date on which the cash settlement amount is paid. If not given, the trade date is guessed from the protection start date and schedule date generation rule.
- cash_settlement_daysint
The number of business days from trade_date to cash settlement date.