Credit Default Swaps: Pricing, Hazard Rates & Valuation

Michael BrenndoerferNovember 18, 202547 min read

Learn CDS pricing using hazard rates and survival probabilities. Master credit risk valuation, implied default probabilities, and spread calculations.

Reading Level

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Credit Default Swaps (CDS) and Credit Derivatives

In the previous chapters on interest rate swaps, you learned how counterparties exchange cash flows to manage interest rate risk. Credit derivatives extend this concept to a different type of risk: the risk that a borrower defaults on their obligations. Among credit derivatives, the credit default swap (CDS) stands as the most important instrument, functioning as insurance against the default of a bond issuer or loan borrower.

The credit derivatives market grew explosively in the early 2000s, reaching over $60 trillion in notional value by 2007. This growth was driven by banks seeking to transfer credit risk off their balance sheets, hedge funds speculating on corporate credit quality, and investors seeking exposure to credit spreads without owning the underlying bonds. The 2008 financial crisis highlighted these instruments when the near-collapse of AIG threatened the global financial system. You must understand how these instruments work, how they are priced, and their risks.

The Nature of Credit Risk

Credit risk is the possibility that a borrower fails to meet their contractual obligations. When you purchase a corporate bond, as we discussed in Bond Fundamentals and Pricing, you receive coupon payments and principal repayment in exchange for lending money to the issuer. However, if the company experiences financial distress and cannot make these payments, you suffer a credit event. This fundamental uncertainty distinguishes corporate and sovereign debt from risk-free government securities, and it explains why investors demand higher yields to compensate for bearing this additional risk.

Understanding credit risk requires recognizing that default is not a binary, all-or-nothing event that occurs predictably. Rather, default probability exists on a continuum, influenced by the borrower's financial health, industry conditions, macroeconomic factors, and countless other variables. The challenge for us is quantifying this probability and pricing it appropriately into financial instruments.

Credit Event

A credit event is a predefined occurrence that triggers the protection payment in a credit derivative contract. Common credit events include bankruptcy, failure to pay, debt restructuring, and obligation acceleration.

The key insight behind credit derivatives is that credit risk can be separated from the underlying bond and traded independently. Just as interest rate swaps allow you to trade interest rate exposure without owning bonds, credit default swaps allow you to trade credit exposure without owning the reference entity's debt. This separation enables participants to acquire, hedge, or transfer credit risk with precision and flexibility not previously available.

Structure of a Credit Default Swap

A credit default swap is a bilateral contract between two parties: the protection buyer and the protection seller. The protection buyer seeks insurance against default of a reference entity (a corporation, sovereign, or other borrower), while the protection seller assumes this risk in exchange for periodic premium payments. This arrangement mirrors traditional insurance contracts in many respects, though important differences exist in how these instruments are regulated and traded.

Out[2]:
Visualization
Diagram showing CDS cash flows between protection buyer and protection seller.
Cash flow structure of a credit default swap (CDS) agreement. The protection buyer makes periodic premium payments to the seller in exchange for a contingent payment (notional minus recovery) that is triggered only if a defined credit event occurs on the reference entity.

The contract specifies several key terms:

  • Reference entity: The corporation, sovereign, or other borrower whose credit risk is being transferred
  • Notional principal: The face value of protection purchased (e.g., $10 million)
  • CDS spread: The annual premium paid by the protection buyer, expressed in basis points of the notional
  • Maturity: The length of the contract, typically 1, 3, 5, 7, or 10 years
  • Credit events: The specific events that trigger the protection payment

Premium Leg and Protection Leg

A CDS has two legs that determine its value, similar to how an interest rate swap has fixed and floating legs. Understanding these two components is essential because CDS pricing fundamentally comes down to equating the expected present value of payments flowing in each direction.

The premium leg represents the periodic payments from the protection buyer to the protection seller. If the CDS spread is ss (expressed as a decimal) and the notional is NN, the protection buyer pays approximately s×Ns \times N per year, typically in quarterly installments. These payments continue until either the contract matures or a credit event occurs. The premium leg thus resembles a stream of coupon payments on a bond, but with a crucial twist: the payments cease immediately upon default, meaning the expected value of this leg depends critically on survival probabilities.

The protection leg represents the contingent payment from the protection seller to the protection buyer if a credit event occurs. Upon default, the protection seller compensates the buyer for the loss on the reference obligation. If the recovery rate is RR (the fraction of face value recovered after default), the protection seller pays (1R)×N(1 - R) \times N. This payment represents the actual economic loss suffered by a bondholder, making the CDS an effective hedge for someone holding the reference entity's debt.

CDS Spread and Credit Risk

The CDS spread is the equilibrium price that makes the expected present value of the premium leg equal to the expected present value of the protection leg. This spread directly reflects the market's assessment of the reference entity's credit risk, serving as a real-time barometer of creditworthiness that often moves faster than bond prices or credit ratings.

CDS Spread

The CDS spread is the annual premium, expressed in basis points of the notional principal, that the protection buyer pays to the protection seller. A spread of 100 basis points means the buyer pays 1% of the notional per year for protection.

To understand how the spread relates to credit risk, consider this simplified relationship. If the probability of default over the next year is pp and the recovery rate is RR, then the expected loss from default is:

Expected Loss=p×(1R)\text{Expected Loss} = p \times (1 - R)

where:

  • pp: probability of default over the next year
  • RR: recovery rate (fraction of face value)
  • (1R)(1 - R): loss given default (LGD)

This formula captures a fundamental insight: what matters for credit risk is not just the probability that default occurs, but the severity of loss when it does occur. A company with a 5% chance of default and 80% recovery poses less credit risk than one with a 3% chance of default and only 20% recovery. The expected loss calculation combines both dimensions of credit risk into a single, comparable metric.

For the CDS to be fairly priced, the premium paid should approximately equal this expected loss. For a one-year CDS, this gives us:

sp×(1R)s \approx p \times (1 - R)

where:

  • ss: CDS spread expressed as a decimal (e.g., 100 bps = 0.01)
  • pp: probability of default
  • RR: recovery rate

This relationship reveals the key factors driving CDS spreads:

  • Higher default probability leads to higher spreads
  • Lower recovery rates lead to higher spreads
  • The spread reflects loss given default, not just probability of default

This approximation has a straightforward interpretation: the CDS spread is essentially the market's estimate of annual expected credit losses. When you pay 100 basis points for protection, the market is implicitly saying that the expected value of your protection payment, considering both the likelihood and severity of default, equals approximately 1% of the notional per year.

Default Probabilities and Hazard Rates

To price CDS contracts rigorously, we need a framework for modeling default. The standard approach uses hazard rates (also called default intensities) to characterize the instantaneous probability of default. This framework is the foundation for credit derivatives pricing, allowing us to move from intuitive concepts to precise values.

Hazard Rate Model

The hazard rate λ(t)\lambda(t) represents the instantaneous conditional probability of default at time tt, given survival up to that point. This concept may seem abstract at first, but it captures something fundamentally important: the intensity of default risk at each moment, measured as a rate rather than a probability. For a small time interval Δt\Delta t:

P(default in [t,t+Δt]survival to t)λ(t)ΔtP(\text{default in } [t, t+\Delta t] \mid \text{survival to } t) \approx \lambda(t) \Delta t

where:

  • λ(t)\lambda(t): instantaneous hazard rate (default intensity) at time tt
  • Δt\Delta t: small time interval
  • tt: current time

Think of the hazard rate as measuring the "default pressure" at each instant. A hazard rate of 0.02 means that, conditional on having survived until now, the probability of defaulting in the next small time interval Δt\Delta t is approximately 0.02×Δt0.02 \times \Delta t. If Δt\Delta t is one year, that corresponds to a 2% conditional probability; if Δt\Delta t is one day (roughly 1/365 of a year), the conditional probability is approximately 0.0055%.

The survival probability Q(t)Q(t), which is the probability of no default by time tt, is related to the hazard rate by:

Q(t)=exp(0tλ(u)du)Q(t) = \exp\left(-\int_0^t \lambda(u) \, du\right)

where:

  • Q(t)Q(t): probability of surviving (no default) until time tt
  • λ(u)\lambda(u): hazard rate at time uu
  • exp()\exp(\cdot): exponential function
  • tt: time horizon

This formula emerges from the mathematical requirement that survival requires avoiding default at every instant from time 0 to time tt. The integral accumulates the hazard rate over time, and the exponential function converts this accumulated hazard into a probability. The negative sign in the exponent ensures that higher cumulative hazard translates to lower survival probability, as intuition demands.

For a constant hazard rate λ\lambda, this simplifies to:

Q(t)=eλtQ(t) = e^{-\lambda t}

where:

  • Q(t)Q(t): survival probability to time tt
  • λ\lambda: constant hazard rate
  • tt: time in years

This exponential survival function is analogous to radioactive decay: at any moment, there is a constant probability rate of default, regardless of how long the entity has survived. Just as a radioactive atom has no memory of how long it has existed, the constant hazard rate model assumes that a company's instantaneous default risk depends only on its current state, not on how long it has been solvent. While this "memoryless" property is a simplification of reality, it provides tractable mathematics and serves as a reasonable first approximation for many applications.

In[3]:
Code
import numpy as np

## Model survival probability with constant hazard rate
hazard_rates = [
    0.01,
    0.02,
    0.05,
    0.10,
]  # 1%, 2%, 5%, 10% annual default intensity
times = np.linspace(0, 10, 100)


def survival_probability(t, hazard_rate):
    """Calculate survival probability under constant hazard rate model."""
    return np.exp(-hazard_rate * t)
Out[4]:
Visualization
Line chart showing survival probability decreasing over time for various hazard rates.
Survival probability curves for hazard rates of 1%, 2%, 5%, and 10%. Higher hazard rates lead to significantly faster decay in survival probability over the 10-year horizon, with the 10% rate resulting in a survival probability of approximately 37% by year 10.

Cumulative Default Probability

The cumulative default probability by time tt is simply one minus the survival probability. This relationship follows directly from the fact that an entity must either survive or default; there is no third possibility.

P(default by t)=1Q(t)(complement of survival)=1eλt(substitute exponential model)\begin{aligned} P(\text{default by } t) &= 1 - Q(t) && \text{(complement of survival)} \\ &= 1 - e^{-\lambda t} && \text{(substitute exponential model)} \end{aligned}

where:

  • Q(t)Q(t): survival probability
  • λ\lambda: constant hazard rate
  • tt: time horizon

For short time horizons and small hazard rates, this approximates to:

P(default by t)λtP(\text{default by } t) \approx \lambda t

where:

  • λ\lambda: hazard rate
  • tt: time horizon

This linear approximation works because the exponential function ex1xe^{-x} \approx 1 - x when xx is small. For a hazard rate of 2% and a one-year horizon, the exact default probability is 1e0.02=0.01981 - e^{-0.02} = 0.0198, while the approximation gives 0.02×1=0.020.02 \times 1 = 0.02. The difference is negligible for practical purposes. However, as time extends or hazard rates increase, the approximation breaks down because it fails to account for the compounding effect: the longer the time horizon, the more the cumulative default probability accelerates relative to the linear approximation.

In[5]:
Code
import numpy as np

## Calculate cumulative default probabilities for a hazard rate of 2%
hazard = 0.02
horizons = [1, 3, 5, 10]

## Calculate probabilities for different horizons
results = []
for t in horizons:
    exact_prob = 1 - np.exp(-hazard * t)
    approx_prob = hazard * t
    results.append((t, exact_prob, approx_prob))
Out[6]:
Console
Cumulative Default Probabilities (λ = 2%):
---------------------------------------------
  1-year: 0.0198 (exact), 0.0200 (approximation)
  3-year: 0.0582 (exact), 0.0600 (approximation)
  5-year: 0.0952 (exact), 0.1000 (approximation)
  10-year: 0.1813 (exact), 0.2000 (approximation)

The approximation works well for short horizons but diverges over longer periods where compounding effects matter.

Out[7]:
Visualization
Comparison of exact cumulative default probability versus the linear approximation for a 2% hazard rate. The linear approximation increasingly overestimates default probability at longer horizons, demonstrating why the exponential model is necessary for multi-year contracts.
Comparison of exact cumulative default probability versus the linear approximation for a 2% hazard rate. The linear approximation increasingly overestimates default probability at longer horizons, demonstrating why the exponential model is necessary for multi-year contracts.

Recovery Rates

When a credit event occurs, bondholders typically recover some fraction of the face value of their holdings. The recovery rate RR represents this fraction and is a critical input to CDS pricing. Understanding recovery rates requires recognizing that they are not fixed constants but rather realizations of a random variable that depends on the nature of the default, the assets available for liquidation, the seniority of the debt, and countless other factors that only become known after default occurs.

Recovery rates vary significantly across industries and seniority levels:

  • Senior secured debt: 50-70% recovery
  • Senior unsecured debt: 35-50% recovery
  • Subordinated debt: 20-35% recovery
  • Junior subordinated: 10-20% recovery

The standard assumption in CDS pricing is a recovery rate of 40% for investment-grade corporates, though this varies by sector. For sovereigns and high-yield issuers, different assumptions may apply. This 40% figure represents a historical average derived from studies of actual defaults, but individual outcomes vary widely. During systemic crises, recovery rates tend to be lower than average because distressed assets flood the market simultaneously, depressing prices.

Loss Given Default (LGD)

Loss given default is the complement of recovery rate: LGD=1R\text{LGD} = 1 - R. If the recovery rate is 40%, the loss given default is 60%, meaning bondholders lose 60 cents for every dollar of face value upon default.

In[8]:
Code
import numpy as np

## Impact of recovery rate on expected loss
default_probability = 0.05  # 5% probability of default over some horizon

recovery_rates = np.array([0.20, 0.30, 0.40, 0.50, 0.60])
loss_given_default = 1 - recovery_rates
expected_loss = default_probability * loss_given_default
Out[9]:
Console
Expected Loss Analysis (5% default probability):
-------------------------------------------------------
  Recovery Rate        LGD   Expected Loss
-------------------------------------------------------
            20%        80%           4.00%
            30%        70%           3.50%
            40%        60%           3.00%
            50%        50%           2.50%
            60%        40%           2.00%

The table shows how sensitive expected losses are to recovery assumptions. A change from 40% to 20% recovery nearly doubles the expected loss.

Out[10]:
Visualization
Relationship between recovery rate and loss given default (LGD). Since LGD is defined as 1 minus the recovery rate, the two variables have a perfect inverse linear relationship.
Relationship between recovery rate and loss given default (LGD). Since LGD is defined as 1 minus the recovery rate, the two variables have a perfect inverse linear relationship.
Expected loss as a function of recovery rate for a 5% default probability. For the standard 40% recovery assumption, the expected loss is 3%, but this nearly doubles to 4.5% if the recovery rate drops to 10%.
Expected loss as a function of recovery rate for a 5% default probability. For the standard 40% recovery assumption, the expected loss is 3%, but this nearly doubles to 4.5% if the recovery rate drops to 10%.

CDS Pricing Framework

The fair CDS spread is determined by the no-arbitrage condition: at inception, the present value of the premium leg must equal the present value of the protection leg. Let's develop this framework step by step, building from the basic principle that a fairly priced derivative should have zero net value at inception.

The logic is straightforward: if the premium leg were worth more than the protection leg, no rational investor would sell protection, since they would be receiving less than the value of the risk they assume. Conversely, if the protection leg were worth more, no investor would buy protection at that price. Market equilibrium occurs only when both legs have equal present value, making either side of the transaction fair.

Setting Up the Valuation

Consider a CDS with maturity TT, premium payments at times t1,t2,,tnt_1, t_2, \ldots, t_n (typically quarterly), and a CDS spread of ss. Let:

  • Q(ti)Q(t_i) = probability of survival to time tit_i
  • D(ti)D(t_i) = discount factor for time tit_i (from the risk-free curve)
  • RR = recovery rate
  • NN = notional principal
  • Δti=titi1\Delta t_i = t_i - t_{i-1} = time between payment dates

These building blocks allow us to express the value of each leg as a sum of expected, discounted cash flows. The survival probabilities capture the likelihood that each payment occurs, while the discount factors convert future values to present values using the time value of money.

Present Value of Premium Leg

The protection buyer pays premiums only while the reference entity survives. The expected present value of the premium leg is:

PVpremium=s×N×i=1nΔti×Q(ti)×D(ti)PV_{\text{premium}} = s \times N \times \sum_{i=1}^{n} \Delta t_i \times Q(t_i) \times D(t_i)

where:

  • ss: CDS spread
  • NN: notional principal
  • Δti\Delta t_i: time accrual factor for period ii
  • Q(ti)Q(t_i): survival probability to payment date tit_i
  • D(ti)D(t_i): discount factor for payment date tit_i
  • nn: total number of payment periods

This formula multiplies each premium payment by the probability that it will actually be made (survival probability) and discounts it to present value. The product Δti×Q(ti)×D(ti)\Delta t_i \times Q(t_i) \times D(t_i) represents the expected, discounted value of receiving one unit of spread payment at time tit_i. By summing over all payment dates and multiplying by the spread and notional, we obtain the total present value of the premium stream.

We also need to account for accrued premium if default occurs between payment dates. Adding this gives:

PVpremium=s×N×[i=1nΔti×Q(ti)×D(ti)+Accrual Adjustment]PV_{\text{premium}} = s \times N \times \left[\sum_{i=1}^{n} \Delta t_i \times Q(t_i) \times D(t_i) + \text{Accrual Adjustment}\right]

where:

  • ss: CDS spread
  • NN: notional principal
  • Δti\Delta t_i: time accrual factor
  • Q(ti)Q(t_i): survival probability
  • D(ti)D(t_i): discount factor
  • Accrual Adjustment\text{Accrual Adjustment}: expected value of premium accrued between the last payment and default
  • nn: total number of payment periods

The accrual adjustment accounts for the fact that if default occurs, say, two months into a quarterly period, the protection buyer typically pays the premium for those two months. This adjustment is often small but contributes to accurate pricing, particularly for shorter-dated contracts where accrual represents a larger fraction of total payments.

For simplicity, we often use the risky annuity factor (sometimes referred to as the RPV01 on a unit notional basis):

RPV01=i=1nΔti×Q(ti)×D(ti)\text{RPV01} = \sum_{i=1}^{n} \Delta t_i \times Q(t_i) \times D(t_i)

where:

  • RPV01\text{RPV01}: risky annuity factor (sum of discounted survival probabilities)
  • Δti\Delta t_i: accrual period
  • Q(ti)Q(t_i): survival probability
  • D(ti)D(t_i): discount factor
  • nn: total number of payment periods

The risky annuity factor is a powerful summary statistic. It tells us the present value of receiving 1 unit of spread per year for the life of the contract, accounting for both discounting and survival probability. The word "risky" in RPV01 distinguishes this from a risk-free annuity, which would assume certain survival. The risky annuity is always less than or equal to the corresponding risk-free annuity because there is some probability that the payments will cease due to default.

Present Value of Protection Leg

The protection seller pays (1R)×N(1-R) \times N upon default. Since default can occur at any time, we integrate over all possible default times:

PVprotection=(1R)×N×0TD(t)×q(t)dtPV_{\text{protection}} = (1-R) \times N \times \int_0^T D(t) \times q(t) \, dt

where:

  • RR: recovery rate
  • NN: notional principal
  • D(t)D(t): discount factor at time tt
  • q(t)q(t): default probability density function
  • TT: time to maturity

This integral captures the expected protection payment by weighting the discounted loss given default by the probability density of default at each instant. The protection payment (1R)×N(1-R) \times N is fixed given our recovery assumption, so the key unknown is when default might occur. The integral sums up the contributions from all possible default times, with each contribution weighted by how likely default is at that moment.

The default density q(t)=dQ(t)dtq(t) = -\frac{dQ(t)}{dt} represents the likelihood of default occurring exactly at time tt. This derivative of the survival function converts cumulative probabilities into instantaneous rates. For a constant hazard rate:

q(t)=λeλtq(t) = \lambda e^{-\lambda t}

where:

  • q(t)q(t): default probability density
  • λ\lambda: constant hazard rate
  • tt: time

Notice that this density function declines over time. This occurs not because the entity becomes safer, but because for default to happen at time tt, the entity must first survive until then. As time passes, the pool of possible default times shrinks because some probability mass has already been "used up" by earlier potential defaults.

In practice, we often discretize this integral by assuming defaults occur at payment dates:

PVprotection(1R)×N×i=1nD(ti)×[Q(ti1)Q(ti)]PV_{\text{protection}} \approx (1-R) \times N \times \sum_{i=1}^{n} D(t_i) \times [Q(t_{i-1}) - Q(t_i)]

where:

  • RR: recovery rate
  • NN: notional principal
  • D(ti)D(t_i): discount factor at payment date ii
  • Q(ti1)Q(ti)Q(t_{i-1}) - Q(t_i): probability of default occurring in period ii
  • nn: total number of payment periods

The term Q(ti1)Q(ti)Q(t_{i-1}) - Q(t_i) represents the probability of defaulting between times ti1t_{i-1} and tit_i. This discretization simplifies computation considerably while remaining accurate for practical purposes, especially when payment periods are short (quarterly or more frequent). The approximation essentially assumes that all defaults within a period occur at the period end, which slightly undervalues the protection leg by deferring the expected payment date.

Fair CDS Spread

To find the fair spread, we equate the present value of the premium leg to the present value of the protection leg. Since the notional principal NN appears on both sides, it cancels out:

PVpremium=PVprotection(no-arbitrage condition)s×N×RPV01=(1R)×N×i=1nD(ti)[Q(ti1)Q(ti)](substitute leg values)s=(1R)×i=1nD(ti)[Q(ti1)Q(ti)]RPV01(solve for s)s=(1R)×i=1nD(ti)[Q(ti1)Q(ti)]i=1nΔti×Q(ti)×D(ti)(expand RPV01)\begin{aligned} PV_{\text{premium}} &= PV_{\text{protection}} && \text{(no-arbitrage condition)} \\ s \times N \times \text{RPV01} &= (1-R) \times N \times \sum_{i=1}^{n} D(t_i) [Q(t_{i-1}) - Q(t_i)] && \text{(substitute leg values)} \\ s &= \frac{(1-R) \times \sum_{i=1}^{n} D(t_i) [Q(t_{i-1}) - Q(t_i)]}{\text{RPV01}} && \text{(solve for $s$)} \\ s &= \frac{(1-R) \times \sum_{i=1}^{n} D(t_i) [Q(t_{i-1}) - Q(t_i)]}{\sum_{i=1}^{n} \Delta t_i \times Q(t_i) \times D(t_i)} && \text{(expand RPV01)} \end{aligned}

where:

  • ss: fair CDS spread
  • NN: notional principal (cancels out)
  • RR: recovery rate
  • D(ti)D(t_i): discount factor at time tit_i
  • Q(t)Q(t): survival probability
  • Δti\Delta t_i: accrual period
  • nn: total number of payment periods

This is the fundamental CDS pricing formula. The numerator represents expected losses from default, while the denominator is the risky annuity factor. The ratio tells us what annual spread payment, made contingent on survival, would have the same present value as the expected protection payment contingent on default. This formula generalizes our earlier approximation sλ(1R)s \approx \lambda(1-R) by properly accounting for discounting and the precise timing of cash flows.

Worked Example: Pricing a 5-Year CDS

Let's work through a complete example of pricing a CDS contract. We'll calculate the fair spread for a 5-year CDS with quarterly premium payments. This example will demonstrate how the theoretical framework translates into concrete calculations that can be implemented programmatically.

Setup

Assume the following parameters:

  • Maturity: 5 years
  • Premium payments: Quarterly
  • Hazard rate: 2% per year (constant)
  • Recovery rate: 40%
  • Risk-free rate: 4% per year (flat term structure)
  • Notional: $10,000,000
In[11]:
Code
import numpy as np

## CDS parameters
maturity_years = 5
payments_per_year = 4
hazard_rate = 0.02  # 2% annual default intensity
recovery_rate = 0.40
risk_free_rate = 0.04
notional = 10_000_000

## Generate payment times
num_payments = maturity_years * payments_per_year
payment_times = np.array(
    [(i + 1) / payments_per_year for i in range(num_payments)]
)
delta_t = 1 / payments_per_year  # Time between payments (0.25 years)
Out[12]:
Console
Number of payment dates: 20
Payment times (years): [np.float64(0.25), np.float64(0.5), np.float64(0.75), np.float64(1.0)] ... [np.float64(4.25), np.float64(4.5), np.float64(4.75), np.float64(5.0)]

Calculate Survival and Discount Factors

In[13]:
Code
## Survival probabilities at each payment date
survival_probs = np.exp(-hazard_rate * payment_times)

## Discount factors (continuous compounding)
discount_factors = np.exp(-risk_free_rate * payment_times)

## Default probabilities for each period
## Q(t_{i-1}) - Q(t_i) = probability of default in period i
survival_probs_prev = np.concatenate([[1.0], survival_probs[:-1]])
default_probs = survival_probs_prev - survival_probs
Out[14]:
Console
Sample survival and discount factors:
------------------------------------------------------------
  Time   Survival Q(t)   Discount D(t)    Default Prob
------------------------------------------------------------
  0.25          0.9950          0.9900          0.0050
  1.00          0.9802          0.9608          0.0049
  2.00          0.9608          0.9231          0.0048
  3.00          0.9418          0.8869          0.0047
  4.00          0.9231          0.8521          0.0046
  5.00          0.9048          0.8187          0.0045
Out[15]:
Visualization
Survival probabilities and discount factors over the 5-year CDS term. Both factors decline over time, with the combined factor reaching approximately 0.74 by year 5, representing the joint impact of credit risk and the time value of money on premium payments.
Survival probabilities and discount factors over the 5-year CDS term. Both factors decline over time, with the combined factor reaching approximately 0.74 by year 5, representing the joint impact of credit risk and the time value of money on premium payments.

Calculate the Risky Annuity (Premium Leg Factor)

In[16]:
Code
## Risky annuity: sum of delta_t * Q(t_i) * D(t_i)
risky_annuity = np.sum(delta_t * survival_probs * discount_factors)
pv_1bp = risky_annuity * notional / 10000
Out[17]:
Console
Risky Annuity (RPV01): 4.287380
PV of 1 bp spread on Notional: $4287.38

The risky annuity (RPV01) indicates that for every $1 of annual premium the expected present value of payments is approximately $4.55. This factor accounts for both the time value of money and the probability that the entity survives to make payments. On the full notional, a 1 basis point spread is worth roughly $4,546.

Calculate the Protection Leg Factor

In[18]:
Code
## Protection leg factor: sum of D(t_i) * [Q(t_{i-1}) - Q(t_i)]
protection_leg_factor = np.sum(discount_factors * default_probs)
Out[19]:
Console
Protection Leg Factor: 0.085962

The protection leg factor represents the present value of receiving $1 contingent on default. It is calculated by summing the discounted probability of default for each period. This value (~0.057) is the cost of protection before adjusting for the recovery rate.

Calculate the Fair CDS Spread

In[20]:
Code
## Fair spread calculation
loss_given_default = 1 - recovery_rate
fair_spread = (loss_given_default * protection_leg_factor) / risky_annuity

## Convert to basis points
fair_spread_bps = fair_spread * 10000
annual_premium = fair_spread * notional
Out[21]:
Console
==================================================
FAIR CDS SPREAD CALCULATION
==================================================

Inputs:
  Hazard rate: 2.00%
  Recovery rate: 40.00%
  Risk-free rate: 4.00%
  Maturity: 5 years

Results:
  Fair CDS spread: 120.30 basis points
  Annual premium: $120,300.50

The calculation results in a fair spread of approximately 75 basis points. This means the protection buyer must pay 0.75% of the notional annually to equate the expected premium payments with the expected default compensation.

Verify: Check Spread vs. Hazard Rate Approximation

Recall our earlier approximation: sλ×(1R)s \approx \lambda \times (1-R). Let's verify:

In[22]:
Code
## Simple approximation
approx_spread = hazard_rate * (1 - recovery_rate)
approx_spread_bps = approx_spread * 10000
difference = abs(fair_spread_bps - approx_spread_bps)
Out[23]:
Console
Exact fair spread: 120.30 bps
Approximation (λ × LGD): 120.00 bps
Difference: 0.30 bps

The approximation sλ(1R)s \approx \lambda(1-R) is quite accurate. The small difference arises from timing effects: the exact formula accounts for discounting and the precise timing of premium and protection payments.

Key Parameters

Understanding CDS spread sensitivity is crucial for pricing and risk management. Each parameter influences the spread predictably, which helps you interpret market movements and manage positions.

The key parameters for CDS pricing are:

  • Hazard Rate (λ\lambda): The instantaneous probability of default. Higher hazard rates increase default probability and thus the CDS spread. This is typically the most important driver of spread movements, as changes in perceived creditworthiness translate directly into hazard rate changes.
  • Recovery Rate (RR): The fraction of face value recovered upon default. Higher recovery rates reduce loss given default, lowering the CDS spread. Recovery rate uncertainty is often neglected in day-to-day trading but becomes critical during distressed situations.
  • Risk-Free Rate (rr): Used to discount future cash flows. Higher rates reduce the present value of both legs, though the net effect depends on the timing of default. In practice, the interest rate effect on CDS spreads is second-order compared to credit factors.
  • Maturity (TT): The duration of the contract. Longer maturities typically command higher spreads if the hazard rate is upward sloping, or simply accumulate more probability of default. The term structure of CDS spreads provides information about market expectations of how credit quality will evolve over time.
  • Notional (NN): The face amount of protection. It scales both the premium and protection payments but cancels out in the spread calculation, meaning the fair spread is independent of the notional amount.
Out[24]:
Visualization
Fair CDS spread sensitivity to hazard rates across different recovery assumptions. Spreads increase linearly with hazard rates, with the slope determined by the loss given default.
Fair CDS spread sensitivity to hazard rates across different recovery assumptions. Spreads increase linearly with hazard rates, with the slope determined by the loss given default.
Fair CDS spread sensitivity to recovery rates for different hazard rate levels. Spreads decline as recovery rates increase, reaching zero when recovery is 100%.
Fair CDS spread sensitivity to recovery rates for different hazard rate levels. Spreads decline as recovery rates increase, reaching zero when recovery is 100%.

CDS Valuation After Inception

Once a CDS is traded, its value changes as credit spreads and interest rates move. The mark-to-market value for the protection buyer is:

Value=PVprotectionPVpremium\text{Value} = PV_{\text{protection}} - PV_{\text{premium}}

where:

  • Value\text{Value}: mark-to-market value for the protection buyer
  • PVprotectionPV_{\text{protection}}: current present value of potential protection payments
  • PVpremiumPV_{\text{premium}}: current present value of remaining premium payments

This valuation approach follows the same logic as valuing a swap after inception: the value is the difference between what you receive and what you pay, where both amounts are recomputed using current market parameters. At inception, this value is zero by construction (assuming the trade was executed at the fair spread), but subsequent market movements cause the value to deviate from zero.

If credit spreads have widened since inception (the reference entity has become riskier), the protection is worth more than originally paid, and the protection buyer has a positive value. Conversely, if spreads have tightened, the protection buyer shows a loss. This mark-to-market behavior is essential for risk management and accounting purposes, even if the ultimate outcome depends on whether default actually occurs.

In[25]:
Code
import numpy as np


def price_cds(
    notional,
    spread_bps,
    hazard_rate,
    recovery_rate,
    risk_free_rate,
    maturity_years,
    payments_per_year=4,
):
    """
    Calculate CDS value for protection buyer.

    Returns dictionary with fair spread and value given contracted spread.
    """
    # Generate payment schedule
    num_payments = maturity_years * payments_per_year
    payment_times = np.array(
        [(i + 1) / payments_per_year for i in range(num_payments)]
    )
    delta_t = 1 / payments_per_year

    # Survival and discount factors
    survival_probs = np.exp(-hazard_rate * payment_times)
    discount_factors = np.exp(-risk_free_rate * payment_times)

    # Default probabilities per period
    survival_probs_prev = np.concatenate([[1.0], survival_probs[:-1]])
    default_probs = survival_probs_prev - survival_probs

    # Premium and protection legs
    risky_annuity = np.sum(delta_t * survival_probs * discount_factors)
    protection_leg_factor = np.sum(discount_factors * default_probs)

    # Fair spread
    loss_given_default = 1 - recovery_rate
    fair_spread = (loss_given_default * protection_leg_factor) / risky_annuity
    fair_spread_bps = fair_spread * 10000

    # Value calculations
    contracted_spread = spread_bps / 10000
    pv_premium = contracted_spread * notional * risky_annuity
    pv_protection = loss_given_default * notional * protection_leg_factor
    value = pv_protection - pv_premium

    return {
        "fair_spread_bps": fair_spread_bps,
        "risky_annuity": risky_annuity,
        "pv_premium": pv_premium,
        "pv_protection": pv_protection,
        "value": value,
    }
In[26]:
Code
## Scenario: We entered a CDS at 100 bps, now spreads have widened
contracted_spread = 100  # bps at inception
current_hazard_rate = 0.03  # Hazard rate has increased from 2% to 3%

result = price_cds(
    notional=10_000_000,
    spread_bps=contracted_spread,
    hazard_rate=current_hazard_rate,
    recovery_rate=0.40,
    risk_free_rate=0.04,
    maturity_years=5,
)
Out[27]:
Console
CDS Mark-to-Market Analysis
==================================================
Contracted spread: 100 bps
Current fair spread: 180.68 bps

PV of premium leg: $418,193.53
PV of protection leg: $755,578.22

Value (protection buyer): $337,384.70

The protection buyer benefits when spreads widen because the protection they purchased at 100 bps is now worth more in the market. The value represents the profit they would realize if they closed the position.

Out[28]:
Visualization
Mark-to-market value of CDS protection for a 100 bps contracted spread. The chart shows the profit and loss zones for the protection buyer, with a widening to 300 bps generating a profit of approximately \$900,000 on a \$10 million notional.
Mark-to-market value of CDS protection for a 100 bps contracted spread. The chart shows the profit and loss zones for the protection buyer, with a widening to 300 bps generating a profit of approximately \$900,000 on a \$10 million notional.

Implied Default Probability from CDS Spreads

CDS spreads provide market-based estimates of default probability. Given an observed spread, we can back out the implied hazard rate using our pricing formula. This "implied probability" represents the market's consensus view of credit risk, incorporating all available information about the reference entity as processed by thousands of market participants.

The approximation sλ(1R)s \approx \lambda(1-R) gives us:

λimplieds1R\lambda_{\text{implied}} \approx \frac{s}{1-R}

where:

  • λimplied\lambda_{\text{implied}}: hazard rate implied by market prices
  • ss: observed market CDS spread
  • RR: assumed recovery rate

The implied hazard rate depends on your recovery rate assumption. If you assume 40% recovery, a 120 bps spread implies a 2% hazard rate. But if you assume 20% recovery, the same spread implies only a 1.5% hazard rate. You must be careful to state your recovery assumptions when discussing implied default probabilities.

In[29]:
Code
import numpy as np

## Extract implied default probabilities from market CDS spreads
observed_spreads_bps = np.array(
    [50, 100, 200, 300, 500, 1000]
)  # Market spreads
recovery_assumption = 0.40

## Implied hazard rates
implied_hazard_rates = (observed_spreads_bps / 10000) / (
    1 - recovery_assumption
)

## 5-year cumulative default probabilities
implied_5y_default_prob = 1 - np.exp(-implied_hazard_rates * 5)
Out[30]:
Console
Implied Default Probabilities from CDS Spreads
------------------------------------------------------------
  CDS Spread (bps)       Implied λ    5Y Default Prob
------------------------------------------------------------
                50          0.83%             4.08%
               100          1.67%             8.00%
               200          3.33%            15.35%
               300          5.00%            22.12%
               500          8.33%            34.08%
              1000         16.67%            56.54%

These implied probabilities provide valuable information about market perceptions of credit risk. A CDS spread of 200 bps implies roughly a 15% probability of default over five years, while 1000 bps (10%) indicates the market sees default as quite likely.

In[31]:
Code
## Calculate ranges for plotting
spread_range = np.linspace(10, 1500, 100)
hazard_range = (spread_range / 10000) / (1 - recovery_assumption)
default_prob_range = 1 - np.exp(-hazard_range * 5)
Out[32]:
Visualization
Line chart showing implied default probability increasing with CDS spread.
Implied 5-year cumulative default probabilities derived from CDS spreads assuming 40% recovery. The relationship is non-linear, showing that as spreads cross the 1,000 basis point threshold, the implied probability of default over five years exceeds 55%.

The curve demonstrates that as CDS spreads widen, the implied default probability increases non-linearly. This convexity means that for high-yield entities, even small spread movements imply significant changes in the market's perception of default risk.

Out[33]:
Visualization
Implied default probability curves for varying recovery rate assumptions (20%, 40%, 60%). The chart demonstrates that for a fixed CDS spread, assuming a higher recovery rate necessitates a higher implied default probability to maintain the same expected loss equivalence.
Implied default probability curves for varying recovery rate assumptions (20%, 40%, 60%). The chart demonstrates that for a fixed CDS spread, assuming a higher recovery rate necessitates a higher implied default probability to maintain the same expected loss equivalence.

Uses of Credit Default Swaps

CDS contracts serve three primary purposes in financial markets: hedging credit exposure, taking speculative positions, and arbitrage strategies.

Hedging Credit Risk

A bank holding a large loan to a corporate borrower can purchase CDS protection to reduce its credit exposure. If the borrower defaults, the bank collects on the CDS to offset its loan losses. This allows banks to manage concentration risk in their loan portfolios without selling the underlying loans, which may be relationship-sensitive.

Consider a bank with a $50 million loan to a company whose credit has deteriorated. The bank can buy 5-year CDS protection at, say, 150 bps, paying $750,000 annually for insurance. If the company defaults with 40% recovery, the bank receives $30 million from the CDS to offset its $30 million loss on the loan.

Speculation on Credit Quality

Investors can use CDS to express views on credit quality without owning bonds. A hedge fund believing a company's credit will deteriorate can buy protection, profiting if spreads widen. Conversely, selling protection is equivalent to going long credit risk and collecting premium income.

This speculative use proved controversial during the European sovereign debt crisis when CDS on Greek, Italian, and Spanish sovereign debt became focal points of market stress. Critics argued that speculative CDS buying amplified the crisis, while defenders noted that CDS spreads provided valuable price discovery about sovereign credit risk.

Basis Trades and Arbitrage

The CDS-bond basis is the difference between the CDS spread and the asset swap spread on the underlying bond:

Basis=CDS SpreadAsset Swap Spread\text{Basis} = \text{CDS Spread} - \text{Asset Swap Spread}

where:

  • Basis\text{Basis}: CDS-bond basis (typically in basis points)
  • CDS Spread\text{CDS Spread}: market spread for the CDS contract
  • Asset Swap Spread\text{Asset Swap Spread}: spread above floating rate earned by swapping the bond

In theory, these should be equal through arbitrage. If the CDS spread is lower than the bond spread (negative basis), you can buy the bond, pay floating through an asset swap, and buy CDS protection, earning the spread difference with minimal credit risk. Basis trades were popular before 2008 but proved dangerous during the crisis when liquidity dried up.

In[34]:
Code
## Example: Evaluating a basis trade opportunity
bond_yield = 0.065  # 6.5% yield
swap_rate = 0.045  # 4.5% swap rate
cds_spread_bps = 250  # 250 bps

## Asset swap spread approximation
asset_swap_spread = bond_yield - swap_rate
asset_swap_spread_bps = asset_swap_spread * 10000

## CDS-bond basis
basis_bps = cds_spread_bps - asset_swap_spread_bps

## Determine trade strategy
if basis_bps > 0:
    basis_type = "Positive basis: CDS is expensive relative to bonds"
    trade = "Sell bond + receive floating (asset swap) + sell CDS protection"
else:
    basis_type = "Negative basis: CDS is cheap relative to bonds"
    trade = "Buy bond + pay floating (asset swap) + buy CDS protection"
Out[35]:
Console
CDS-Bond Basis Analysis
----------------------------------------
Bond yield: 6.50%
Swap rate: 4.50%
Asset swap spread: 200 bps
CDS spread: 250 bps
CDS-bond basis: 50 bps

Positive basis: CDS is expensive relative to bonds
Trade: Sell bond + receive floating (asset swap) + sell CDS protection

The positive basis indicates that the CDS acts as the more expensive instrument compared to the cash bond. The identified trade capitalizes on this by selling the expensive protection and hedging with the cheaper bond position.

Out[36]:
Visualization
Simulated historical CDS-bond basis showing periods of positive and negative basis. Negative basis indicates that CDS protection is cheap relative to bonds, creating an arbitrage opportunity to earn the spread difference while hedging credit risk.
Simulated historical CDS-bond basis showing periods of positive and negative basis. Negative basis indicates that CDS protection is cheap relative to bonds, creating an arbitrage opportunity to earn the spread difference while hedging credit risk.

Other Credit Derivatives

While CDS dominate the credit derivatives market, several other instruments exist for trading credit risk.

Credit-Linked Notes (CLN)

A credit-linked note is a funded instrument that combines a bond with an embedded CDS. The investor purchases the note (providing funding) and receives coupon payments. If the reference entity defaults, the investor suffers a loss on the principal. CLNs allow investors who cannot enter derivatives to gain exposure to credit spreads.

Total Return Swaps

In a total return swap, one party pays the total return on a reference asset (coupons plus price appreciation) while the other pays a floating rate plus a spread. This transfers both credit risk and market risk without transferring ownership of the underlying asset.

Credit Spread Options

Options on CDS spreads allow investors to express views on credit volatility or hedge against spread movements. A payer swaption gives the right to buy CDS protection at a specified spread, while a receiver swaption gives the right to sell protection.

We'll explore structured credit products like collateralized debt obligations (CDOs) in the next chapter, which build on single-name CDS to create complex portfolios of credit risk.

Limitations and Risks

Despite their usefulness, credit derivatives carry significant risks that the 2008 financial crisis made painfully clear. Understanding these limitations is essential for prudent use of these instruments.

Counterparty Risk

Unlike exchange-traded derivatives, CDS are over-the-counter contracts where the protection seller might fail to pay when the reference entity defaults. This counterparty risk was dramatically illustrated by AIG, which had sold massive amounts of CDS protection on mortgage-backed securities. When the housing market collapsed, AIG faced margin calls it could not meet, requiring a government bailout to prevent cascading failures. Post-crisis reforms have pushed more CDS trading to central clearinghouses, which interpose themselves between buyers and sellers and require margin collateral.

Wrong-Way Risk

Wrong-way risk occurs when the likelihood of counterparty default is correlated with the credit quality of the reference entity. For example, if a bank buys CDS protection on another bank from a third bank, all three may face stress simultaneously during a financial crisis, precisely when the protection is needed most. This correlation of counterparty and reference entity default risk undermines the hedging value of CDS in systemic crises.

Liquidity Risk

CDS markets can become illiquid during periods of stress. The basis between CDS spreads and bond spreads can widen dramatically when funding becomes scarce, as happened in 2008 when the basis reached hundreds of basis points. Traders who assumed convergence was inevitable faced margin calls before the basis normalized, forcing them to close positions at large losses.

Model Risk

CDS pricing relies on assumptions about hazard rates, recovery rates, and their correlation. The standard model assumes independence between default timing and recovery rates, but in practice these may be correlated. Default clusters (where multiple entities default simultaneously) can occur more frequently than models predict, as the financial crisis demonstrated with mortgage-related securities.

Regulatory and Basis Risk

The definition of credit events can be ambiguous, leading to disputes about whether protection should pay out. The International Swaps and Derivatives Association (ISDA) maintains standardized documentation, but novel situations (like the Greek restructuring in 2012) can still create uncertainty. Additionally, CDS may not perfectly hedge the specific bond held by the protection buyer, creating basis risk between the protection payoff and actual losses.

Summary

Credit default swaps transformed credit risk from an illiquid, embedded feature of loans and bonds into a tradeable instrument. The key concepts from this chapter include:

CDS Structure: A CDS involves a protection buyer paying periodic premiums to a protection seller in exchange for compensation if the reference entity experiences a credit event. The premium leg consists of spread payments contingent on survival, while the protection leg provides a payment equal to loss given default.

Pricing Framework: The fair CDS spread equates the present value of expected premiums with the present value of expected protection payments. For a constant hazard rate λ\lambda and recovery rate RR, the spread approximates sλ(1R)s \approx \lambda(1-R). The exact formula accounts for discounting and the timing of cash flows using survival probabilities and discount factors.

Implied Default Probabilities: CDS spreads provide market-based estimates of credit risk. A spread of 100 bps with 40% recovery implies roughly a 1.67% annual default probability, or about 8% cumulative probability over five years.

Applications: CDS serve to hedge credit exposure in loan portfolios, speculate on credit quality changes, and execute arbitrage strategies exploiting the CDS-bond basis.

Risks: Counterparty risk, wrong-way risk, liquidity risk, and model risk all present challenges. The 2008 financial crisis revealed how these risks can materialize simultaneously during periods of systemic stress.

The next chapter extends these concepts to structured credit products, where portfolios of credit risk are tranched and distributed to different investor classes based on their risk appetite.

Quiz

Ready to test your understanding? Take this quick quiz to reinforce what you've learned about credit default swaps and credit derivatives.

Loading component...

Reference

BIBTEXAcademic
@misc{creditdefaultswapspricinghazardratesvaluation, author = {Michael Brenndoerfer}, title = {Credit Default Swaps: Pricing, Hazard Rates & Valuation}, year = {2025}, url = {https://mbrenndoerfer.com/writing/credit-default-swaps-cds-pricing-valuation}, organization = {mbrenndoerfer.com}, note = {Accessed: 2025-01-01} }
APAAcademic
Michael Brenndoerfer (2025). Credit Default Swaps: Pricing, Hazard Rates & Valuation. Retrieved from https://mbrenndoerfer.com/writing/credit-default-swaps-cds-pricing-valuation
MLAAcademic
Michael Brenndoerfer. "Credit Default Swaps: Pricing, Hazard Rates & Valuation." 2026. Web. today. <https://mbrenndoerfer.com/writing/credit-default-swaps-cds-pricing-valuation>.
CHICAGOAcademic
Michael Brenndoerfer. "Credit Default Swaps: Pricing, Hazard Rates & Valuation." Accessed today. https://mbrenndoerfer.com/writing/credit-default-swaps-cds-pricing-valuation.
HARVARDAcademic
Michael Brenndoerfer (2025) 'Credit Default Swaps: Pricing, Hazard Rates & Valuation'. Available at: https://mbrenndoerfer.com/writing/credit-default-swaps-cds-pricing-valuation (Accessed: today).
SimpleBasic
Michael Brenndoerfer (2025). Credit Default Swaps: Pricing, Hazard Rates & Valuation. https://mbrenndoerfer.com/writing/credit-default-swaps-cds-pricing-valuation