Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How Credit-Default-Swap Pricing Algorithms Work: Premium Legs, Protection Legs, Hazard Curves, Survival Probabilities, Recovery and CS01

Quick answer: a credit-default swap (CDS) is valued by balancing two expected cash-flow streams. The premium leg is the periodic fee paid for credit protection while the reference entity has not experienced the contractually relevant credit event. The protection leg is the contingent payment expected if a covered credit event occurs. A pricing algorithm uses a discount curve, quoted CDS terms, a recovery assumption and a calibrated survival/default model to make those two legs consistent with market prices. The central mathematical object is the survival curve Q(t): the probability, under the pricing measure and model assumptions, that the reference entity survives to time t.

A CDS spread is not a probability. It is a price generated by probability, recovery, discounting, contract rules, liquidity and market risk premia together.

Reader question and page role

This page answers one mathematical question: how does a bank turn CDS quotes into a survival/hazard curve and a mark-to-market value?

It does not own the general borrower-default problem; see credit-rating migration models. It does not own post-default severity; see Loss Given Default. And it does not own counterparty exposure between the two CDS counterparties; see counterparty credit risk.

This page owns the pricing bridge between quoted CDS contracts and implied credit-survival mathematics.

Why this belongs in mathematics

CDS valuation combines present value, conditional probability, survival analysis, numerical root-finding, piecewise curves and sensitivity derivatives.

The par-pricing condition is conceptually:

PV(premium leg) = PV(protection leg).

If the contractual coupon differs from the current fair spread, the difference appears as an upfront or mark-to-market value. Pricing therefore means finding the hazard/survival curve that makes observed market quotes internally consistent across maturities.

1. The economic exchange

At a high level:

  • the protection buyer pays a periodic premium;
  • the protection seller provides a contingent payoff if a contractually defined credit event occurs;
  • payments depend on the reference entity, reference obligation/transaction terms and settlement mechanism.

ISDA’s credit-derivatives documentation defines the contractual framework used for many CDS transactions, including credit-event and settlement terms. See 2014 ISDA Credit Derivatives Definitions and the current ISDA Credit Derivatives Overview.

2. Survival probability and hazard rate

Let τ be the random default/credit-event time represented by the model. Define the survival probability:

Q(t) = P(τ > t).

If λ(t) is the hazard intensity, then under a standard reduced-form construction:

Q(t) = exp(−∫0t λ(u)du).

For a flat hazard λ:

Q(t)=e−λt.

The default probability over (t1,t2] is then approximately Q(t1)−Q(t2).

3. The premium leg is a risky annuity

If N is notional, s is the contractual annual spread, Δi is the accrual fraction for payment period i and D(ti) is the discount factor, the scheduled premium component is approximately:

PVpremium ≈ N s Σ ΔiD(ti)Q(ti) + accrued-on-default value.

The factor Q(ti) appears because scheduled premium is paid only if the contract survives to that payment date, subject to contract conventions. The accrued-on-default term matters because premium can accrue between the previous coupon date and a credit event.

The premium leg is therefore not an ordinary fixed-income annuity. It is a survival-weighted annuity.

4. The protection leg is expected discounted loss

If R is the assumed recovery fraction, then loss given default is approximately 1−R for the simplified model. The protection-leg PV is conceptually:

PVprotection = N(1−R) ∫ D(t)dP(default by t).

Using the hazard representation:

PVprotection ≈ N(1−R)∫ D(t)λ(t)Q(t)dt.

The protection leg therefore rises when hazard increases or assumed recovery falls, all else equal.

5. Fair spread is protection PV divided by risky PV01

Define risky PV01 (also called risky annuity in many implementations) as the present value of one unit of annual premium spread, including the relevant accrual conventions.

Then the fair CDS spread is:

sfair = PVprotection / RiskyPV01.

This formula is more useful than saying “spread equals default probability,” because it shows the denominator: a five-year contract with short expected survival has less premium-paying time than a low-risk five-year contract.

6. The familiar spread/(1−recovery) rule is only an approximation

Under a simplified flat-hazard, flat-discount approximation, one often sees:

λ ≈ s/(1−R).

If spread s = 150 basis points = 1.5% and recovery R = 40%, then:

λ ≈ 0.015/0.60 = 2.5% per year.

A flat-hazard five-year survival approximation is:

Q(5)=e−0.025×588.25%.

This is useful intuition, not production CDS calibration. Real pricing includes the payment schedule, discount curve, accrued premium, standardized contract terms and a term structure of hazards.

7. Bootstrapping the hazard curve one maturity at a time

Suppose the market quotes CDS at 1Y, 3Y, 5Y, 7Y and 10Y. A common calibration assumes a piecewise-constant hazard rate over intervals.

  1. Use the 1Y quote to solve λ0,1.
  2. Hold that first interval fixed.
  3. Use the 3Y quote to solve the next hazard interval so the 3Y contract prices correctly.
  4. Continue maturity by maturity.

Each step is a root-finding problem:

F(λk) = PVpremium − PVprotection = 0.

Bisection, Brent methods or Newton-like solvers can be used depending on implementation. The numerical method must preserve sensible survival probabilities and handle distressed quotes robustly.

8. The discount curve enters both legs

Future premium and protection cash flows must be discounted. Modern collateralized derivatives practice generally uses discounting consistent with the collateral/funding framework and applicable market conventions rather than an arbitrary “risk-free rate.”

The relevant curve machinery connects to How Yield-Curve Algorithms Build the Term Structure and interest-rate swap valuation.

Discounting and default are different dimensions. A CDS curve cannot be calibrated correctly if the discount factors feeding the valuation are inconsistent with the rest of the derivatives stack.

9. Recovery is an assumption with strong price sensitivity

For the same CDS spread, a lower assumed recovery generally implies a lower hazard rate is needed to generate the same expected protection value, because each default is assumed to lose more. A higher recovery assumption does the opposite.

This creates identification ambiguity: spread alone does not uniquely reveal both hazard and recovery. The calibration usually fixes or otherwise specifies recovery and solves for hazard.

That is why a market-implied “default probability” should always be accompanied by the recovery assumption used to derive it.

10. Standard coupons and upfront value separate contract cash flow from market spread

Modern CDS markets use standardised contractual conventions. A new trade may have a fixed running coupon while the market’s fair spread is different. The present-value difference is exchanged as an upfront amount under the relevant convention.

Conceptually:

Upfront value ≈ PV(protection) − PV(contractual premium).

A distressed name can therefore trade with a large upfront payment rather than an extremely large bespoke running coupon. Pricing systems need both the quoted market convention and the contractual coupon.

11. Mark-to-market after the spread moves

Suppose protection was bought when the fair spread was 100 bps. Later, comparable protection trades at 250 bps. The old contract’s fixed premium is now cheap relative to current protection cost, so the position generally has positive value to the protection buyer, all else equal.

The valuation algorithm does not simply multiply the 150-bp change by notional and maturity. It reprices the full risky annuity and protection leg using the updated hazard curve, discount factors, remaining maturity and accrued premium.

12. CS01 is the local spread sensitivity

CS01 measures the approximate change in CDS value for a one-basis-point credit-spread move, under a specified bump methodology.

Numerically:

CS01 ≈ V(s+1bp) − V(s)

with sign convention stated explicitly.

For a curve, banks can compute tenor CS01s by bumping individual maturities or curve nodes. This reveals whether a five-year CDS is really exposed only to the five-year quote or to several bootstrapped nodes.

13. Jump-to-default is not captured by CS01

A small spread bump is a local perturbation. Default is a discontinuous event. Jump-to-default (JTD) asks how the position changes if the reference entity experiences the relevant credit event now and the contract settles according to its terms.

A position can have modest daily CS01 and very large JTD. Local sensitivity and event loss are different risk objects.

14. Credit-event settlement makes contract law part of the algorithm

Pricing before default assumes a contingent payoff. After a credit event, the actual settlement depends on contractual definitions, determination processes, deliverable obligations and auction/settlement mechanics where applicable.

ISDA maintains the 2014 Credit Derivatives Definitions and current physical-settlement matrices/confirmations used by market participants. The machine cannot price a CDS correctly if it models a generic “company defaults” event while the legal contract defines a narrower or differently timed event.

Current source: ISDA Credit Derivatives Physical Settlement Matrix and Confirmation.

15. CDS spread and bond spread are related but not identical

A bond and CDS on the same issuer both contain credit information, but their spreads can diverge because of:

  • funding/repo conditions;
  • bond-specific liquidity;
  • deliverability and contract details;
  • different maturities and cash-flow structures;
  • counterparty/collateral effects;
  • supply and demand for protection;
  • market segmentation and technical flows.

The CDS-bond basis is therefore a diagnostic, not a guaranteed arbitrage. A persistent basis can be evidence of omitted funding or liquidity constraints rather than a free profit.

16. Reference-entity risk and counterparty risk are different nodes

If Bank A buys CDS protection from Bank B on Company C, there are at least two credit questions:

  • Will Company C experience the contractual credit event?
  • Will Bank B be able to perform when the protection payment is owed?

Central clearing, margin and collateral can reduce or reorganise counterparty risk, but they do not remove reference-entity credit risk. ICE Clear Credit, for example, operates clearing and end-of-day pricing/risk processes for cleared CDS. See ICE Clear Credit.

For valuation adjustments around counterparty/funding/margin, see How Banks Calculate Derivatives XVA.

17. Evidence polarity: implied probability is model-conditioned evidence

If a CDS curve implies a high hazard rate, it is evidence that protection is expensive under the model and market conditions. It is not a literal statement that the observed spread equals a physical default probability.

The market spread can include:

  • expected credit loss;
  • risk premium for bearing systematic credit risk;
  • liquidity premium;
  • technical supply/demand;
  • contract and funding effects.

A “market-implied probability” is therefore conditional on a pricing measure, recovery assumption and model architecture. It should not be reported as an objective forecast without qualification.

18. The CDS-pricing pipeline

  1. Identify the exact CDS contract and reference entity.
  2. Load payment dates, day counts and contractual coupon.
  3. Load the discount curve consistent with the valuation setup.
  4. Choose/validate the recovery assumption.
  5. Load market CDS quotes across maturities.
  6. Assume a hazard-curve parameterisation.
  7. Bootstrap hazard intervals so each quoted CDS reprices.
  8. Construct survival probabilities Q(t).
  9. Calculate scheduled and accrued-on-default premium PV.
  10. Calculate expected protection-leg PV.
  11. Compute fair spread/upfront and mark-to-market.
  12. Bump curves to calculate CS01 and other sensitivities.
  13. Calculate jump-to-default and recovery sensitivity separately.
  14. Reconcile results with independent/standard-model calculations and market quotes.

19. Alternatives to the reduced-form hazard model

Hazard-rate models are not the only way to think about credit. Alternatives include:

  • structural models that relate default to firm asset value and debt;
  • rating-transition models that evolve discrete credit states;
  • machine-learning default models for forecasting physical default probabilities;
  • scenario/stress models that impose macro credit deterioration directly.

These answer different questions. A market-consistent CDS price calibration is not automatically the best borrower-default forecast, and a credit-scoring model is not automatically suitable for marking a traded CDS.

20. Failure modes

  • Spread=probability error. A quoted spread is reported directly as default probability.
  • Recovery hidden. Implied hazard is presented without stating the recovery assumption.
  • Flat-hazard overreach. s/(1−R) is used as production valuation across all maturities.
  • Accrual omission. Premium accrued between payment dates and default is ignored.
  • Curve inconsistency. Discount factors differ from the approved derivatives curve stack.
  • Negative/unstable bootstrap. Noisy quotes produce implausible survival curves and the solver accepts them silently.
  • Contract abstraction. The model prices generic default while the legal CDS has specific credit-event and settlement terms.
  • CS01=default loss error. Local spread sensitivity is mistaken for jump-to-default exposure.
  • Bond-CDS identity assumption. Bond and CDS spreads are expected to match exactly regardless of funding and liquidity.
  • Counterparty/reference confusion. Protection-seller default risk is mixed with the reference entity’s credit event.

21. Diagnostics and falsifiers

  • Does the bootstrapped curve reprice every calibration quote within tolerance?
  • Are all survival probabilities between 0 and 1 and non-increasing with maturity?
  • How sensitive is implied hazard to recovery?
  • What is the difference between CS01 and jump-to-default for the same position?
  • Does an independent implementation reproduce the risky PV01?
  • Which maturity quote drives the largest curve instability?
  • Does the CDS-bond basis persist after funding and liquidity costs are included?
  • What changes if recovery is stressed rather than held fixed?
  • Does the contract’s actual credit-event definition match the event represented by the model?

Suppose someone claims, “A 300-bp CDS spread means a 3% annual default probability.” A falsifier is the same 300-bp quote valued under two different recovery assumptions: the implied hazard changes. Discounting, accrual and risk premia also matter. Spread is a market price, not an unconditioned probability statement.

22. Verification and update triggers

  • reprice all calibration instruments after every curve build;
  • compare with the applicable ISDA standard-model implementation/conventions;
  • validate coupon dates, accrual and settlement calendars;
  • stress recovery and discount curves;
  • flag non-monotone or economically implausible survival output;
  • independently calculate CS01 and JTD;
  • update legal definitions and settlement conventions when documentation changes;
  • recalibrate after material spread moves or new market quotes;
  • keep physical default forecasting separate from risk-neutral pricing;
  • reconcile cleared positions and valuations to clearing-house statements where applicable.

Connections across the finance-and-banking algorithms lane

Research anchors

The deeper lesson

CDS pricing is a clean demonstration of how a market price becomes a probability-shaped object without becoming a literal probability forecast. Premium cash flows are weighted by survival. Protection cash flows are weighted by default. Recovery changes the loss conditional on default. Discounting changes time value. Contract definitions decide what event actually triggers payment. Calibration then solves backwards from traded prices to a hazard curve. The model is useful precisely because every hidden assumption can be named, stressed and falsified.

Educational note: This article explains public derivatives mathematics and market conventions. It is not investment advice, trading advice or a recommendation to buy or sell credit protection.

Discover more from Bukit Timah Tutor

Subscribe now to keep reading and get access to the full archive.

Continue reading