Module credit
Expand description
Credit instruments.
Structs§
- CdoTranche
- A synthetic CDO tranche
[attach, detach]on an index pool, priced off the large-homogeneous-pool expected tranche loss under base correlation. - CdsDiagnostics
- What a credit default swap resolved to when it was priced: each part of its value, signed as it enters that value, and the risky annuity behind its quote.
- Credit
Default Swap - A single-name credit default swap.
- Credit
Default Swap Option - A European option on a CDS: the right at
expiryto enterunderlying— the CDS it exercises into, its protection starting after expiry — as a payer (buying protection at thestrikespread) or a receiver (selling it), held long orshort. - Credit
Event - A credit event on one constituent of an index: the defaulted entity, its weight in the index (a share of the original notional, 1/125 for CDX IG), the recovery the ISDA auction fixed, and the event date.
- Credit
Linked Note - A credit-linked note: the funded single-name credit product.
- Index
Credit Default Swap - An index CDS (CDX / iTraxx): the homogeneous-pool product.
- Index
Settlement - What a credit event settles on an index position, each amount signed to
the holder: the protection on the defaulted weight,
notional·w·(1 − R), received by a protection buyer; and the premium accrued on that weight over the running period to the event date, paid by the buyer. - NthTo
Default Swap - An nth-to-default basket swap: premium accrues while fewer than
nconstituents have defaulted; protection pays(1 − R̄)·Non the nth default. The trigger survivalQ(t) = P(N(t) < n)comes from the one-factor Gaussian copula’s count distribution with each constituent’s default probability read off its own survival curve — the first product declaring a basket of entities. - Tranche
Settlement - What a credit event settles on a tranche position, and where it leaves the tranche.
Enums§
- Accrual
OnDefault - How premium accrued since the last coupon date is settled on default.
- Basket
Correlation - Where a basket’s asset correlation comes from.
- CdsOption
Style - What a default before a CDS option’s expiry does to it, and the model that follows.
- CdsStrike
Type - How a CDS option’s strike is quoted.
- Credit
Default Swap Option Error - Why a CDS option could not be built.
- Credit
Error - A credit trade that cannot be built as specified.
- Default
Payment Time - When a payment contingent on a default is made, and so discounted from, on a credit-linked swap.
- Tranche
Copula - Where a tranche’s copula comes from.
- Tranche
Mark - A tranche model input as a caller spells it: a number, the contract’s,
or
"Market", the market’s mark for the tranche’s index. - Tranche
Recovery - Where a tranche’s recovery model comes from.
Constants§
- CASH_
SETTLEMENT_ 🔒BUSINESS_ DAYS - Business days from trade to cash settlement of a standard contract’s upfront and accrual rebate (the post-2009 ISDA standard, T+3).
Functions§
- accrual_
halfway_ kernel - The halfway accrual-on-default kernel at unit coupon:
(α/2)of the protection kernel,αthe enclosing coupon’s accrual. - accrual_
proportional_ kernel - The proportional accrual-on-default kernel over one interval
[a, b]of lengthdeltayears that startsleadyears into the coupon’s accrual:∫ₐᵇ (lead + (t − a)) · DF(t) · (−dS(t))under a flat hazardhand a flat forwardron the interval, in closed formh·DF(a)·S(a)·[lead·(1 − e^{−kδ})/k + (1 − e^{−kδ}(1 + kδ))/k²]withk = r + h, by its series wherekδis small. Divided by the coupon’s whole accrual, it is the fraction of the coupon accrued to the default, weighted and discounted — what a contingent coupon settles underAccrualOnDefault::Proportional. - check_
event 🔒 - Refuses an event
cdscannot carry at the remainingfactor: a weight that is not positive or exceeds it, an auction recovery outside[0, 1], or an event date outside the protection. - check_
recovery_ 🔒floor - A recovery floor checked to
[0, 1). - holder_
sign 🔒 +1for a protection buyer,−1for a seller.- premium_
leg - The standard premium leg on
scheduleatcoupon: a fixed-rate leg whose final period accrues through its end date inclusive — ACT/360 with the last day added, the ISDA standard model’slastPeriodDayCounter— so the last coupon pays one day more than the plain fraction, and which is paid on the maturity rolled to a business day oncalendarunderconvention, as every earlier coupon is paid on its rolled accrual end: a Sunday maturity pays on the Monday. - protection_
kernel - The ISDA protection kernel over one interval of a flat hazard
hand flat forwardr:h·DF(a)·S(a)·(1 − e^{−kΔ})/k,k = r + h, with the|kΔ| → 0seriesΔ·(1 − kΔ/2 + k²Δ²/6). - running_
accrual 🔒 - The premium per unit notional the running period has accrued by
date: the couponc·τ(start, date)of the period whose accrual holdsdate, zero on a coupon date.