You are here in the market-data-to-CVA chain A horizontal rail of eleven markers, one per chapter: IR-01 to IR-08 on the left, XVA-01 to XVA-03 on the right. IR-05 to IR-08 are drawn hollow under a bracket reading "written, not yet published". The chapter being read is ringed in crimson and named above the rail, and the object it consumes and the object it produces are printed below it. Market data to CVA · the whole chain, IR-01 to XVA-03 IR-01 · Bootstrap the SOFR curve IR-02 · Multi-curve bootstrapping IR-03 · Swaptions and the vol surface IR-04 · Why we model rates as random XVA-01 · Exposure XVA-02 · Netting, CSA and collateral XVA-03 · Credit Valuation Adjustment written, not yet published IR XVA 0102 0304 0506 0708 0102 03 INmarket quotes IN14 SOFR par quotes INESTR + EURIBOR INP(0,T), ATM vol grid INP(0,T) INV(t,ω), 5000 paths INEE(t) per trade INEEnet(t), dPD(t) OUTCVA OUTP(0,T), 14 pillars OUTtwo curves, a basis OUTσN, swaption prices OUTr(t,ω) under Q OUTEE(t), PFE(t,q) OUTEEnet(t) OUTCVA
You are here · XVA-03 This chapter turns a netted exposure profile and a credit curve into one number. Source: website/figures/pipeline-strip.svg.
Prerequisites

This chapter requires:

  • XVA-01: Expected Exposure EE$(t)$ and EPE
  • XVA-02: Netted/collateralised portfolio EE$(t)$ per netting set

No credit background assumed: the CDS spread and the hazard rate are built from scratch here.

By the end, you can compute CVA from an exposure profile and a hazard rate curve, and know which assumptions the formula requires.

The problem CVA solves

You enter a five-year interest rate swap with a corporate counterparty. On day one it is at-the-money, worth zero to both sides. Rates move, the swap becomes valuable to you, and then they default. You close out and recover some fraction of what they owed you, but not all of it.

This is counterparty credit risk, and it creates a loss that has nothing to do with rates moving against you. It is a credit loss caused by the coincidence of two things: your trade being in-the-money and your counterparty being insolvent. CVA is the expected present value of that loss, computed at trade inception and charged as an upfront adjustment to the risk-free price.

With $V^{\text{rf}}$ the risk-free mark-to-market, the price you should quote to a counterparty with non-trivial default risk is:

CVA adjustment $$V = V^{\text{rf}} - \text{CVA}$$

Deriving the CVA formula

On default you recover a fraction $R$ (the recovery rate) of the amount owed. If your counterparty defaults at $\tau \leq T$ when the trade is worth $V(\tau) > 0$ to you, your loss is $(1 - R) \cdot V(\tau)$. If $V(\tau) \leq 0$, the close-out amount is a claim of the estate on you: you pay it in full and neither lose nor gain. Only the $V(\tau) > 0$ side costs anything, which is why CVA is non-negative. The mirror image, your own default seen from their side, gives rise to DVA.

You do not know when they will default, nor what the trade will be worth when they do, so average over both under $\mathbb{Q}$: over every default date $t$, weighted by the marginal probability $dPD(t)$ that default lands in $[t, t+\mathrm{d}t]$, and over every path the trade can take by then, which is $\text{EE}(t)$ from XVA-01. Discount on the curve $P(0,t)$ of IR-01:

Unilateral CVA formula $$\text{CVA} = (1-R)\int_0^T P(0,t) \cdot \text{EE}(t) \cdot dPD(t)$$

The integral runs over the life of the trade. At each instant, you weight the exposure you are running by the probability of losing it. The $(1-R)$ factor accounts for the partial recovery you receive from the bankruptcy estate.

Why this substitution is legal

That formula compresses three steps, each a place where published derivations quietly cut a corner. None changes the answer; all three change whether you are entitled to it.

Throughout this XVA series, $\tau$ denotes the counterparty's default time (a random variable, distinct from the day-count fraction $\tau_j$ used in the IR series). The loss at default time $\tau$ is $(1-R) \cdot V^+(\tau)$, where $V^+(\tau) = \max(V(\tau), 0)$ is the positive part. Discounting back to today and taking expectations under the risk-neutral measure $\mathbb{Q}$, the discount factor is the genuinely stochastic accumulator $\beta(0,\tau)^{-1} = \exp(-\int_0^\tau r_s\,ds)$, evaluated at the random time $\tau$:

CVA as an unconditional expectation $$\text{CVA} = (1-R)\,\mathbb{E}^{\mathbb{Q}}\!\Bigl[\mathbf{1}_{\{\tau \leq T\}}\,e^{-\int_0^\tau r_s\,ds}\,V^+(\tau)\Bigr]$$

Note the difference between $e^{-\int_0^\tau r_s\,ds}$ (random, depends on the path of $r$ up to the random time $\tau$) and the deterministic curve $P(0,t) = \mathbb{E}^{\mathbb{Q}}\!\bigl[e^{-\int_0^t r_s\,ds}\bigr]$ (a function of a fixed maturity $t$). The substitution of the deterministic $P(0,t)$ for the stochastic accumulator is only legal after we condition on $\tau$ and invoke an independence assumption two steps below.

Condition on the default time $\tau$. The law of total expectation turns the outer expectation into an integral over default dates, weighted by $dPD(t)$:

Conditioning on default time $$\text{CVA} = (1-R)\int_0^T \mathbb{E}^{\mathbb{Q}}\!\Bigl[e^{-\int_0^t r_s\,ds}\,V^+(t)\,\Big|\,\tau = t\Bigr]\,dPD(t)$$

To pull the bond price out of the conditional expectation we need two assumptions, jointly known as the independence assumption for unilateral CVA: the default time $\tau$ is independent of both the short-rate process $r$ and the exposure process $V$, and (for stochastic-rate models) the rate and exposure processes are themselves independent under $\mathbb{Q}$ (or, equivalently, $V^+(t)$ is interpreted in the $T_t$-forward measure with the $T_t$-forward EE; see Brigo, Morini & Pallavicini 2013, Ch. 13, and Crépey 2015, Ch. 4). Under these assumptions:

Factoring the conditional expectation $$\mathbb{E}^{\mathbb{Q}}\!\Bigl[e^{-\int_0^t r_s\,ds}\,V^+(t)\,\Big|\,\tau = t\Bigr] = \mathbb{E}^{\mathbb{Q}}\!\bigl[e^{-\int_0^t r_s\,ds}\bigr]\,\mathbb{E}^{\mathbb{Q}}\!\bigl[V^+(t)\bigr] = P(0,t)\,\text{EE}(t)$$

Substituting back gives the working formula above.

Every EE number below comes from xvafoundations.pricing.reprice_swap_paths on a Hull-White simulation with $a = 0.05$, $\sigma = 0.007$, seed 42, 5,000 paths, quarterly grid. Those two parameters are asserted, not calibrated: IR-05 and IR-06 are unwritten, so nothing here is a calibration result.

Default probability from the CDS market

The other ingredient is a term structure of default probabilities: risk-neutral ones, implied by the credit default swap market rather than measured from history. The CDS spread $s(T)$ is the annual premium charged to insure against default over $[0, T]$; from it we extract a hazard rate $\lambda(t)$, the instantaneous probability of defaulting in the next instant given survival to $t$.

Under a flat hazard rate, the survival probability to time $t$ is:

Survival probability (flat hazard rate) $$Q(\tau > t) = e^{-\lambda t}$$

The marginal default probability in $[t, t+\mathrm{d}t]$ is then $\mathrm{d}\text{PD}(t) = \lambda e^{-\lambda t}\,\mathrm{d}t$, and for a spread $s$ quoted in decimal form against a recovery rate $R$:

Hazard rate from CDS spread (approximation) $$\lambda \approx \frac{s}{1 - R}$$
Derivation: hazard rate from CDS pricing

A CDS contract has two legs. The protection leg pays $(1-R)$ at default. The premium leg pays the spread $s$ continuously until default or maturity $T$. At inception, the two legs are equal:

$$\underbrace{(1-R)\int_0^T e^{-(\lambda+r)t}\lambda\,dt}_{\text{protection leg}} = \underbrace{s\int_0^T e^{-(\lambda+r)t}\,dt}_{\text{premium leg}}$$

Under a flat hazard rate $\lambda$ and flat risk-free rate $r$, both integrals share the same kernel $e^{-(\lambda+r)t}$, which cancels. What remains is $(1-R)\lambda = s$, giving $\lambda = s/(1-R)$.

This identity is exact for continuous premium payments and constant $\lambda$. With discrete quarterly payments or a term structure of spreads, it becomes a first-order approximation. For precise calibration, bootstrap piecewise-constant hazard rates from the full CDS curve.

One counterparty carries the rest of this chapter: 5Y CDS at 120 bp, recovery 40%, so $\lambda = 0.0120\,/\,0.60 = 0.020$. That flat hazard also prices the 10Y trade of the maturity comparison below, where ten-year survival is $e^{-0.20} = 81.9\%$. The complementary 18.1% is risk-neutral: it carries the market's default risk premium and sits well above the realised default frequency of a triple-B issuer.

One quote becomes a curve, and each year's default probability is a vertical drop Two rows. The top row is a chain: a tile reading "5Y CDS quote, s = 120 bp", an arrow labelled "divide by one minus recovery, 0.60", and a second tile reading "hazard rate, lambda = 0.0200 per year". The bottom row plots the survival probability S(t) = exp(minus lambda t) against time from 0 to 5 years, on a vertical axis truncated at 0.900 so the decay is visible: 1.0000 today, 0.98020 at year 1, 0.96079 at year 2, 0.94176 at year 3, 0.92312 at year 4 and 0.90484 at year 5. At each year end a dashed guide carries the previous year's level across, and a crimson vertical segment drops from it to the curve. That drop is the marginal default probability for the year: 1.9801 percent in year 1, easing to 1.8279 percent in year 5. The five drops are almost the same height, which is why the credit leg contributes almost no shape to CVA. ÷ (1 − R) = 0.60 5Y CDS quote s = 120 bp hazard rate λ = 0.0200 / yr SURVIVAL S(t) = e−λt · WHO IS LEFT 1.9801% 1.000 0.900 1 2 3 4 5 t, years each crimson drop is that year’s PD: 1.9801% in year 1, 1.8279% in year 5
Figure 1 · XVA-03 One quote fixes the whole curve, and the five annual default probabilities differ by less than a fifth of a percentage point. Credit contributes level to CVA, not shape. Read the drop, not the curve: PD$(t_{j-1}, t_j)$ is the vertical fall of $S$ over that year. Source: window.CHART_DATA["xva-03-cva"].survival, flat $\lambda = 0.0200$. Vertical axis truncated at 0.900 so the decay is legible; the drops are to scale with each other.

Discretised CVA: a numerical example

In practice the integral is discretised over monitoring dates $t_1 < t_2 < \cdots < t_M = T$, with $\text{PD}(t_{j-1}, t_j) = Q(\tau > t_{j-1}) - Q(\tau > t_j)$:

Discretised CVA $$\text{CVA} \approx (1-R)\sum_{j=1}^{M} P(0,t_j)\cdot\text{EE}(t_j)\cdot\text{PD}(t_{j-1}, t_j)$$

The trade is a 5-year payer swap, USD 10 million notional, struck at its own par rate of 3.92% so it is worth zero on day one.

CVA is an area: three curves multiplied year by year, then summed Four stacked panels sharing one time axis from 0 to 5 years, with a vertical guide at each year end. Panel one is expected exposure EE(t) on a quarterly grid, in US dollars: it rises to 110,357 at year 1, saws down to 95,958 at 1.25 years just after the annual coupon settles, climbs to a peak of 126,292 at year 3, and falls to 66,081 at year 5. The four sawtooth drops fall at 1.25, 2.25, 3.25 and 4.25 years, immediately after each annual coupon date, and the five annual monitoring dates therefore sit on local maxima. Panel two is the marginal default probability per year, drawn as five almost equal bars running from 1.9801 percent in year 1 to 1.8279 percent in year 5. Panel three is the discount curve P(0,t), a smooth line from 1.0000 today to 0.82522 at year 5 on an axis truncated at 0.80. Panel four is the product of the three panels for each year, in US dollars: 2,097.03, then 2,221.76, then 2,145.59, then 1,807.68, then 996.78. Exposure peaks in year 3 but the largest contribution is year 2, because by year 3 both the discount factor and the survival probability have decayed further. The five contributions sum to 9,268.84 US dollars, and multiplying once by loss given default of 0.60 gives a CVA of 5,561 US dollars, which is 5.6 basis points of the 10 million notional. EE(t) · WHAT YOU COULD LOSE, USD 126,292 each drop is a coupon paid 150k 0 × PD(t-1, t) · HOW LIKELY YOU LOSE IT 1.9801% down to 1.8279%: nearly flat 3% 0 × P(0,t) · WHAT IT IS WORTH TODAY 1.0000 today, 0.82522 at year 5 1.00 0.80 = CONTRIBUTION PER YEAR, USD 2,097.03 2,221.76 2,145.59 1,807.68 996.78 2,000 0 1 2 3 4 5 t, years Σ = USD 9,268.84 × LGD (1 − R) = 0.60 CVA = USD 5,561 5.6 bp of USD 10m notional
Figure 2 · XVA-03 Credit is nearly flat and discounting a smooth slide, so CVA takes its shape from the exposure. Year 3 has the most exposure; year 2 costs the most. Multiply the three panels year by year: 0.92549 × 123,684.90 × 1.9409% gives the year-2 bar, USD 2,222. Source: window.CHART_DATA["xva-03-cva"], from xvafoundations.xva.cva, seed 42, 5,000 paths. Panel A is the quarterly profile; panels B to D are the five annual monitoring dates. CVA is USD 5,561.30 before rounding.
CVA computation inputs: 5Y payer swap, USD 10M, par 3.92%
Year P(0,t) EE(t) (USD) PD(t-1, t) P · EE · PD (USD) × (1−R) (USD)
10.95964110,356.831.9801%2,097.031,258.22
20.92549123,684.901.9409%2,221.761,333.06
30.89299126,292.401.9025%2,145.591,287.35
40.85896112,852.331.8648%1,807.681,084.61
50.8252266,081.281.8279%996.78598.07

Adding the printed column gives 5,561.31 against an unrounded USD 5,561.30. Rounding before summing is how a published CVA stops matching its own table, so every total here is rounded once, at the end, from the unrounded profile.

Discretisation accuracy

The sum above evaluates $\text{EE}$ and $P(0,\cdot)$ at the right endpoint $t_j$ of each interval $[t_{j-1}, t_j]$, which matches the library implementation in xvafoundations.xva.cva. This right-point quadrature is first-order accurate: halving the step size halves the error. The trapezoidal rule, which averages the contributions at both endpoints of each interval, is second-order accurate and significantly better for smooth EE profiles. In practice, quarterly monitoring dates ($M = 20$ for a 5-year trade) combined with trapezoidal quadrature is standard and sufficient for most portfolios.

What that costs, measured rather than asserted: same paths, same curve, same hazard rate on the quarterly grid gives USD 5,080.39 against the annual grid's USD 5,561.30, an overstatement of 9.5%. Discretisation, not model risk, and its direction is not an accident: the swap pays annually, so each annual node lands just before a payment date, exactly where the sawtooth in EE peaks.

How CVA scales

CVA bends down in the spread and up in the maturity Two panels, both on the quarterly grid for the same 5-year payer swap. The upper panel plots CVA against the counterparty CDS spread from 0 to 960 basis points: 2,600 US dollars at 60 bp, 5,080 at 120, 9,701 at 240, 13,902 at 360, 17,722 at 480, 21,192 at 600, 24,345 at 720, 27,208 at 840 and 29,806 at 960. A dashed straight line from the origin through the 120 basis point point shows what proportional scaling would give, reaching 40,643 at 960 basis points against the actual 29,806, so the curve falls further below the line as the spread widens. The lower panel is two horizontal bars for maturity at a fixed notional: the 5-year swap at 5,080 US dollars and the 10-year swap at 22,198, so twice the maturity costs 4.4 times the CVA. CVA vs CDS SPREAD · BENDS DOWN 120 bp · 5,080 if proportional: 40,643 960 bp · 29,806 42k 0 240 480 720 960 CDS spread, bp CVA vs MATURITY, SAME NOTIONAL 5Y 10Y USD 5,080 USD 22,198 twice the maturity, 4.4 times the CVA
Figure 3 · XVA-03 CVA is concave in the spread and convex in the maturity. Doubling a wide spread buys you less than double; doubling the maturity costs more than double. The dashed line is CVA held proportional to $s$; the gap to it is the survival decay eating the far-dated exposure. Source: xvafoundations.xva.cva on the quarterly grid, seed 42, 5,000 paths. Maturity panel: Trade B (5Y) and Trade A (10Y), both USD 10m and struck at their own par rate.

Notional. Exactly linear: $\text{EE}(t)$ is proportional to notional.

Maturity. Super-linear for swaps. EE grows before it decays, so extending maturity adds high-exposure intervals rather than low-exposure ones.

Volatility. Higher volatility typically increases CVA for at-the-money trades. The expected exposure $\text{EE}(t) = \mathbb{E}^{\mathbb{Q}}[\max(V(t), 0)]$ is option-like, so when $\mathbb{E}^{\mathbb{Q}}[V(t)]$ is held fixed, Jensen's inequality on the convex function $x \mapsto x^+$ gives a one-sided benefit from dispersion. The argument is cleanest at-the-money; for a deep in-the-money trade the positive part is approximately linear over the bulk of the distribution, and additional volatility can shift mass into the negative tail (where the max is zero) without proportionally raising the positive tail, so the relationship can weaken or even reverse. The unconditional rule of thumb "more vol, more CVA" should be read as an ATM statement.

Hazard rate. Linear in $\lambda$ at small spreads, sub-linear as they widen: $e^{-\lambda t}$ decays faster and erodes the far-dated exposure you were charging for. Doubling 120 bp to 240 bp multiplies CVA by 1.91 rather than 2, and by 960 bp the compounded factor is 5.87 rather than 8.

Computing CVA in code

compute_cva in xvafoundations.xva.cva takes an EE profile, discount factors, a survival curve and the recovery rate:

Python · PyTorch
from datetime import date

import torch
from xvafoundations.calibration import Stripper
from xvafoundations.conventions import DayCount, year_fraction
from xvafoundations.curves import InterpolationMethod
from xvafoundations.data import sofr
from xvafoundations.instruments import (
    build_instruments, initial_rates, pillar_maturities,
)
from xvafoundations.models import HullWhite1F
from xvafoundations.pricing import SwapSpec, reprice_swap_paths
from xvafoundations.xva.exposure import compute_ee, compute_ene
from xvafoundations.xva.cva import compute_cva, compute_dva

torch.set_default_dtype(torch.float64)

# ── Market and model, as in XVA Ch.01: the IR-01 SOFR curve, then
#    Hull-White with a = 0.05 and sigma = 0.007 asserted, not calibrated.
specs, valuation_date = sofr.INSTRUMENTS, sofr.VALUATION_DATE
stripper = Stripper(
    maturities=torch.tensor(pillar_maturities(specs, valuation_date)),
    initial_rates=torch.tensor(initial_rates(specs)),
    instrument_factory=lambda c: build_instruments(specs, valuation_date, c),
    method=InterpolationMethod.LOGLINEAR,
)
stripper.calibrate()
curve = stripper.get_curve()
model = HullWhite1F(a=0.05, sigma=0.007, curve=curve)

# ── Trade: the 5Y payer swap, USD 10m, annual ACT/360 schedule, struck
#    at its own par rate of 3.9200%. Quarterly grid, 5,000 paths, seed 42.
schedule = [
    year_fraction(valuation_date,
                  date(valuation_date.year + 1 + k, 1, 15), DayCount.ACT360)
    for k in range(5)
]
par = curve.par_swap_rate(torch.tensor(0.0), torch.tensor(schedule)).item()
spec = SwapSpec(notional=1.0e7, fixed_rate=par,
                fixed_payment_times=schedule, pay_fixed=True)
short_rates, times = model.simulate(5000, 20, 5.0, seed=42)  # 0.00 .. 5.00
mtm_paths = reprice_swap_paths(model, spec, short_rates, times)  # (5000, 21)

ee  = compute_ee(mtm_paths)    # shape (21,)
ene = compute_ene(mtm_paths)   # shape (21,), non-negative

# P(0,t) is the bootstrapped SOFR curve from IR Ch.01, not a flat rate.
discount = curve.zc_price(torch.tensor(0.0), times)

# ── Two credit curves, not one ──────────────────────────────────────
# CVA uses the COUNTERPARTY's spread; DVA uses YOUR OWN.
cpty_hazard = 0.0120 / (1.0 - 0.40)   # lambda = s / (1-R), s = 120 bp
own_hazard  = 0.0060 / (1.0 - 0.40)   # your own name, s = 60 bp
cpty_survival = torch.exp(-cpty_hazard * times)
own_survival  = torch.exp(-own_hazard * times)

# ── CVA and DVA ─────────────────────────────────────────────────────
cva = compute_cva(ee, times, discount, cpty_survival, recovery=0.40)
dva = compute_dva(ene, times, discount, own_survival, own_recovery=0.40)

print(f"CVA = USD {cva.item():,.2f}")   # CVA = USD 5,080.39
print(f"DVA = USD {dva.item():,.2f}")   # DVA = USD 2,508.30
print(f"Bilateral adjustment = USD {(dva - cva).item():,.2f}")
# Bilateral adjustment = USD -2,572.09

Simulation and repricing dominate the listing; CVA itself is tensor arithmetic on the finished profile. The annual table above is the same call on the five nodes $t = 1, \ldots, 5$.

CVA Greeks: sensitivities that matter

CVA is hedged dynamically, not charged and forgotten. Two sensitivities matter most.

CS01 (credit spread delta): the change in CVA for a 1 bp parallel shift in the counterparty's CDS curve, hedged by buying protection. It differentiates the quoted spread $s$, not the hazard rate $\lambda$, and the distinction is not cosmetic. Since $\lambda = s/(1-R)$, the chain rule contributes a $1/(1-R)$ that cancels the $(1-R)$ in front of the integral, and recovery drops out of the leading term:

CS01 $$\text{CVA} = s\int_0^T P(0,t)\,\text{EE}(t)\,e^{-\lambda t}\,\mathrm{d}t, \qquad \frac{\partial\,\text{CVA}}{\partial s} = \frac{\text{CVA}}{s}\bigl(1 - \lambda\bar{T}\bigr)$$
$\bar{T}$: the exposure-weighted average maturity, $\bar{T} = \int_0^T t\,P(0,t)\text{EE}(t)e^{-\lambda t}\,\mathrm{d}t \big/ \int_0^T P(0,t)\text{EE}(t)e^{-\lambda t}\,\mathrm{d}t$

The $\lambda\bar{T}$ term is what the naive $\text{CVA}/s$ misses: widening the spread also accelerates the survival decay. On the annual grid $\bar{T} = 2.72$ years, so $\lambda\bar{T} = 5.4\%$ and the closed form gives USD 43.83 per basis point against a naive USD 46.34. On the quarterly grid $\bar{T} = 2.46$ years and the answer is USD 40.26 per basis point. Both are the closed form on the published profile, never a bump-and-revalue: a one-sided bump prices a shifted trade rather than a derivative, and its answer moves with the bump size.

CS01 is CVA over s, less the slice the survival decay takes back Two horizontal bars, one per monitoring grid. Each bar has full length equal to the naive sensitivity CVA divided by s, and a short greyed segment cut off its right end equal to the lambda times T-bar correction. On the annual grid the full bar is 46.34 US dollars per basis point, the greyed slice is 5.4 percent of it, and the published CS01 is 43.83 US dollars per basis point. On the quarterly grid the full bar is 42.34, the slice is 4.9 percent, and the published CS01 is 40.26. A footnote records the re-bumped check: a central difference on the same discrete sums returns 44.29 and 40.36 per basis point, above the closed form by 1.1 and 0.3 percent, which is the continuous identity read on a discrete grid. ANNUAL GRID · CVA / s = 46.34/BP CS01 = USD 43.83/bp decay takes back 5.4% QUARTERLY GRID · CVA / s = 42.34/BP CS01 = USD 40.26/bp decay takes back 4.9% re-bumped as a check: 44.29 and 40.36 per bp
Figure 4 · XVA-03 Dividing CVA by the spread overstates the hedge ratio by the survival-decay term, 5.4% of it on the annual grid and 4.9% on the quarterly one. The greyed stub is $\lambda\bar{T}$ of the bar; what is left is the published CS01. Source: $\partial\text{CVA}/\partial s = (\text{CVA}/s)(1 - \lambda\bar{T})$ evaluated on the profile of window.CHART_DATA["xva-03-cva"]. The check is a central difference at $h = 10^{-5}$ on the same sums, quoted to show the residual, not to price it.

IR Delta: a curve shift moves the mark-to-market on every path, the EE profile, and CVA with it, so the overlay must be hedged jointly with the swap itself. The cross-gamma to credit is wrong-way risk showing up in the Greeks: a payer swap gains value when rates rise, and if the counterparty's spread widens in those same states, CVA rises non-linearly.

Wrong-way risk

Wrong-way risk (WWR) is what the independence assumption buys the formula, and it is often violated: a counterparty is more likely to default precisely when your exposure to them is large.

Formally WWR is a statement about the conditional expectation along the default-time slice, not a static correlation: it arises whenever $\mathbb{E}^{\mathbb{Q}}[V^+(t)\,|\,\tau = t] > \mathbb{E}^{\mathbb{Q}}[V^+(t)]$ (Hull and White 2012, "CVA and Wrong-Way Risk"; Brigo, Morini & Pallavicini 2013, Ch. 13). The factorisation needs independence, not merely zero correlation, which is strictly weaker, so $P(0,t)\,\text{EE}(t)$ stops being a valid substitution and the integral does not factor.

Wrong-way risk moves the whole distribution, it does not tilt a correlation A schematic, not a simulation. Two bell-shaped densities of the trade value V(t) at one fixed date are drawn over the same axis, with the zero of value marked. The navy bell is the distribution over all paths, which is what EE(t) averages. The crimson bell is the distribution restricted to the paths on which the counterparty defaults at exactly that date, and it sits to the right of the navy one. The part of each bell to the right of zero is shaded, because only positive value costs anything at default. The crimson shaded area is visibly larger than the navy one, so the expected positive exposure conditional on default exceeds the unconditional expected positive exposure and the independent formula understates CVA. ALL PATHS, AND THE DEFAULT SLICE all paths paths where they default at t V(t) = 0 trade in your favour → shaded is the positive part: the only part that costs anything at default. The crimson area is bigger, so independence undercharges.
Figure 5 · XVA-03 Wrong-way risk is not a tilt in a correlation, it is a different distribution: the one you get after conditioning on default at that date. Both bells describe the same trade at the same date; the crimson one keeps only the paths on which default lands there. Schematic. Two Gaussians with a shifted mean, drawn to make the conditioning visible; no number in this figure is simulated.

Two ways out. A Gaussian copula of parameter $\rho$ ties the rate driver to the default time: simulate both jointly and average $V^+(t)$ over the default-time slice, at the cost of the factorisation (Brigo, Morini & Pallavicini 2013). Or solve CVA, exposure and intensity as one coupled BSDE, where dependence falls out of the dynamics rather than being imposed, at the cost of regression Monte Carlo (Crépey 2015).

A note on DVA

Everything above is unilateral CVA. You might also default, which is a risk to them; the symmetric adjustment is DVA, Debt Valuation Adjustment. Under full bilateral netting:

Bilateral adjustment $$V = V^{\text{rf}} - \text{CVA} + \text{DVA}$$
Two nearly mirrored profiles, two very different adjustments Expected exposure EE(t) is drawn above a zero line and expected negative exposure ENE(t) below it, both for the same 5-year payer swap on the same quarterly grid, both on a scale reaching 150,000 US dollars in each direction. The two profiles are close in size: EE peaks at 126,292 at year 3 while ENE peaks at 146,805 at year 2, and averaged over the life ENE sits 4.4 percent below EE. Both saw down after each annual coupon. Below the chart, two tiles: CVA against a counterparty at 120 basis points is 5,080.39 US dollars, and DVA on an own-name spread of 60 basis points is 2,508.30. The net adjustment to the trade value is minus 2,572.09 US dollars. The asymmetry comes almost entirely from the two credit spreads, not from the two exposure profiles. EE(t) ABOVE, ENE(t) BELOW · USD EE peaks 126,292 ENE peaks 146,805 150k 0 150k 1 2 3 4 5 t, years CVA, them at 120 bp USD 5,080.39 DVA, you at 60 bp USD 2,508.30 net adjustment USD −2,572.09
Figure 6 · XVA-03 The two exposure profiles are nearly mirror images, so the whole asymmetry between CVA and DVA is the two credit spreads. Priced at the counterparty's own 120 bp instead of your 60 bp, DVA is USD 4,909.77, within 3.4% of CVA. Source: xvafoundations.xva.cva and compute_dva on compute_ee and compute_ene, quarterly grid, seed 42, 5,000 paths.

DVA has a sign that feels counterintuitive until you ask whose balance sheet it sits on. Your own credit deteriorating makes your DVA larger, which reduces the value of what you owe: a liability you are less likely to pay in full is worth less to whoever holds it. That is why a bank carrying DVA in P&L books a gain when its own spreads widen. The gain is arithmetically correct and economically unrealisable, since collecting it requires defaulting, which is why Basel III filters it out of CET1.

FVA, the funding valuation adjustment, captures the cost of funding uncollateralised exposures, and it has partially displaced DVA in practitioner thinking.

Scope and limitations

Two assumptions carry everything above. The framework assumes independence between exposure and default probability, so no wrong-way risk: once that fails, $P(0,t)\,\text{EE}(t)$ no longer factors out, and where the dependence runs the wrong way the number here understates the charge. It assumes a constant recovery rate, used identically in $\lambda = s/(1-R)$ and in the loss given default $(1-R)$, which is exactly why $R$ cancels from the leading CS01 term; stochastic recovery breaks that cancellation. FVA, KVA, SA-CVA and the wrong-way-risk models above each relax one of the two and keep this arithmetic underneath.

References

  1. Gregory, J. (2020). The xVA Challenge (4th ed.). Wiley. The standard practitioner reference.
  2. Crépey, S. (2015). Counterparty Risk and Funding: A Tale of Two Puzzles. Chapman & Hall/CRC. The BSDE treatment used above.
  3. Green, A. (2015). XVA: Credit, Funding and Capital Valuation Adjustments. Wiley.
  4. Brigo, D., Morini, M. & Pallavicini, A. (2013). Counterparty Credit Risk, Collateral and Funding. Wiley. Bilateral CVA, wrong-way risk, the forward-measure argument.
  5. Hull, J. & White, A. (2012). "CVA and Wrong-Way Risk." Financial Analysts Journal, 68(5), 58-69. The conditional-expectation definition of WWR adopted here.
  6. Cesari, G., Aquilina, J., Charpillon, N., Filipović, Z., Lee, G. & Manda, I. (2009). Modelling, Pricing, and Hedging Counterparty Credit Exposure. Springer.
  7. Brigo, D. & Mercurio, F. (2006). Interest Rate Models: Theory and Practice (2nd ed.). Springer.