Credit Default Swaps (CDS) and Credit Derivatives › CDS Valuation After Inception

Michael BrenndoerferNovember 18, 20255 min read
Quantitative FinanceAll chapters
Part 4 of 15Swaps and Credit Derivatives
Chapter 22Credit Default Swaps (CDS) and Credit Derivatives › CDS Valuation After Inception
Reading section 10 of 16 · CDS Valuation After Inception · 5 minSection 10 of 16 · 5 min

Book contents

Section 10 of 16 · 5 min read

Credit Default Swaps (CDS) and Credit Derivatives › CDS Valuation After InceptionOne section · Sections in this chapter10 / 16 ↓
Reading tools Definitions & inline links

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.

Article links

Make inline references clickable

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=PVprotection−PVpremium\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 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
Line chart showing CDS mark-to-market value versus current fair spread, with teal shading for profit when spreads widen above the 100 bps contracted level and coral shading for losses when spreads narrow.
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.