Skip to main content

CDS

Credit Default Swap. The protection buyer pays a periodic premium; the protection seller pays the loss-given-default if the reference name defaults during the trade's life.

Economics

LegSideMechanic
Premiumbuyer → sellerQuarterly fixed-rate payment on remaining notional
Contingentseller → buyerOne-off (1 - recovery) × notional at default time
scheduleDefaults:
CDS: { frequencyMonths: 3, dayCountConvention: Act360 }

cds:
referenceNames:
- TSLA

On-chain template

Proposal: Swap.CdsProposal. Accept: CdsAccept. The reference name comes from cds.referenceNames (config-driven; add new names there, not in source).

Pricing inputs

In demo profile:

demo:
cdsStub:
defaultProb: 0.02 # annual hazard rate
recovery: 0.40

In production the credit curve provider publishes per-name default probabilities (Phase 9).

Pricing

PV(premium leg) = Σ DF(t) × spread × notional × accrual(t) × survivalProb(t)
PV(contingent leg) = ∫ DF(t) × (1 - recovery) × notional × dDefaultProb(t)

NPV(buyer) = PV(contingent) − PV(premium)

Maturity-anchored discount

CDS pricing uses maturityDate as the discount anchor (not today) so the present value remains stable across days as the trade ages — this matches Bloomberg / standard CDS pricing convention.

Observation gotcha

Observation.observe in Daml Finance is exact-time Map.lookuplastEventTimestamp on the CDS instrument must be grid-aligned to a published observation, or evolve will fail with no observation found. The seed scripts ensure alignment; if you're authoring CDS instruments by hand, mind the grid.