CVA gets explained in one of two ways. Either it’s a formula in a paper, wrapped in enough notation that you finish no wiser about what it’s for. Or it’s a one-liner — “the market value of counterparty credit risk” — that’s technically correct and completely useless.

Neither tells you what a CVA desk actually does, why a trade worth zero can cost you money, or why the number moves when nothing about the trade has changed.

This is the version I’d give someone joining the desk.

Start with the problem, not the formula

You do a five-year interest rate swap with a counterparty. You price it, it’s at par, both sides agree it’s worth zero today. Everyone signs.

Two years in, rates have moved your way. The swap is now worth 400,000 to you — meaning the counterparty owes you that amount over the remaining life.

Then they default.

What do you lose? Not the notional. Not zero either. You lose the 400,000 that was owed to you, less whatever you recover in the workout. The trade you thought was risk-free once it was hedged has just cost you real money, and no amount of delta hedging would have prevented it.

CVA is the price of that possibility, charged up front. It’s what the risk-free price of a derivative overstates its value by, once you admit the person on the other side might not be there to pay.

    \[\text{Risky value} = \text{Risk-free value} - \text{CVA}\]

That’s the whole idea. Everything else is machinery for calculating the second term.

The asymmetry that makes it hard

Here’s the thing that makes counterparty risk unlike ordinary credit risk, and it’s the source of every complication that follows.

If you lend someone money, your exposure is known: it’s the loan. With a derivative, your exposure depends on where the market goes — and crucially, you only lose when the trade is in your favour. If they default while you owe them money, you’re fine. You pay what you owe and move on.

So your exposure isn’t the mark-to-market. It’s the positive part of the mark-to-market:

    \[\text{Exposure}(t) = \max(V(t), 0)\]

That max is why a trade worth zero today still carries risk:

import numpy as np
np.random.seed(3)
n = 200_000

# A forward whose future MtM is symmetric around zero
mtm = np.random.standard_normal(n) * 500_000

print(f"Mean MtM:                   {mtm.mean():>12,.0f}")
print(f"Mean exposure, max(MtM,0):  {np.maximum(mtm,0).mean():>12,.0f}")
Mean MtM:                           -933
Mean exposure, max(MtM,0):       198,399

The trade is worth nothing in expectation. Your expected exposure is two hundred thousand. That gap is the entire reason CVA exists — and it’s why you can’t compute it by looking at today’s valuation. You have to simulate where the trade might go.

Notice also what that max does mathematically: it’s an option payoff. CVA is fundamentally an option on the counterparty’s default, struck at your own exposure. That’s not an analogy — it’s why CVA has vega, why it needs a full simulation rather than a formula, and why the people who calculate it are quants rather than credit analysts.

The three ingredients

Every CVA calculation, however sophisticated, is combining three things across future time:

  1. Exposure — how much might they owe you at each future date? This is the hard part, and it’s a full portfolio simulation.
  2. Default probability — how likely are they to fail in each window? This comes from CDS spreads where they trade, from proxies where they don’t.
  3. Loss given default — if they fail, how much don’t you get back? One minus the recovery rate, conventionally 40% recovery for senior unsecured.

Multiply, discount, sum across time:

    \[\text{CVA} = (1-R) \int_0^T \text{EE}(t) \, DF(t) \, dPD(t)\]

Read in words: for each future window, take how much they’d likely owe you, weight it by the chance they default in that window, discount it back, and scale by what you’d lose. Add them up.

The exposure profile is the real work

Notice that steps two and three are a handful of numbers. Step one is a Monte Carlo simulation of your entire portfolio with that counterparty, over its whole life, under thousands of market scenarios.

That’s why CVA is computationally brutal. You’re not pricing a trade — you’re re-pricing an entire netting set at every future time step, on every path.

Here’s the shape of it for a single swap:

import numpy as np
np.random.seed(7)

notional, T, n_steps, n_paths = 10_000_000.0, 5.0, 60, 50_000
dt = T/n_steps
r0, sigma_r, kappa = 0.03, 0.010, 0.20
fixed_rate, recovery, hazard, r_disc = 0.03, 0.40, 0.02, 0.03

# 1. Simulate the market: mean-reverting short rate
rates = np.full((n_paths, n_steps+1), r0)
for i in range(1, n_steps+1):
    Z = np.random.standard_normal(n_paths)
    rates[:,i] = (rates[:,i-1] + kappa*(r0-rates[:,i-1])*dt
                  + sigma_r*np.sqrt(dt)*Z)

# 2. Revalue the swap on every path, at every date
times = np.arange(n_steps+1)*dt
mtm = np.zeros_like(rates)
for i in range(n_steps+1):
    annuity = T - times[i]                     # remaining life
    mtm[:,i] = (rates[:,i] - fixed_rate) * annuity * notional

# 3. Exposure is the positive part; profile it
exposure = np.maximum(mtm, 0.0)
EE  = exposure.mean(axis=0)                    # expected exposure
PFE = np.percentile(exposure, 97.5, axis=0)    # potential future exposure

# 4. Default probabilities from a flat hazard rate
surv = np.exp(-hazard*times)
pd_bucket = surv[:-1] - surv[1:]

# 5. Combine
df = np.exp(-r_disc*times)
EE_mid, df_mid = 0.5*(EE[:-1]+EE[1:]), 0.5*(df[:-1]+df[1:])
cva = (1-recovery) * np.sum(EE_mid * df_mid * pd_bucket)

print(f"Peak Expected Exposure: {EE.max():>12,.0f}")
print(f"Peak PFE (97.5%):       {PFE.max():>12,.0f}")
print(f"CVA:                    {cva:>12,.0f}")
print(f"CVA in bp of notional:  {cva/notional*1e4:>11.1f} bp")
Peak Expected Exposure:      150,301
Peak PFE (97.5%):            735,101
CVA:                           5,372
CVA in bp of notional:         5.4 bp

Five basis points on a ten million swap. Small enough to ignore on one trade, which is exactly how banks ended up with billions of it before 2008.

The exposure profile for a swap has a characteristic hump: it rises early as rates have time to move away from the fixed rate, then falls as payments are made and remaining life shrinks. Different products have different shapes — an FX forward peaks at maturity, a cross-currency swap peaks late because principal exchanges at the end. Knowing the shape of your exposure profile is half of understanding your counterparty risk.

The vocabulary, decoded

The exposure measures get used loosely and mean different things:

  • EE (Expected Exposure) — the average exposure at a given future date. This is what feeds CVA.
  • EPE (Expected Positive Exposure) — the EE averaged over time. A single summary number, used in regulatory capital.
  • PFE (Potential Future Exposure) — a high percentile, typically 95th or 97.5th. The bad case. Used for limits, not for pricing.
  • ENE (Expected Negative Exposure) — the mirror image: what you might owe them. This drives DVA.

The distinction that matters in practice: EE is for pricing, PFE is for limits. You charge CVA based on the average; you refuse the trade based on the tail. Confusing them is a common way to have an argument with the credit officer that neither of you can win.

Netting: the single biggest lever

If you have a netting agreement, you don’t compute exposure trade by trade. You compute it on the net position, because on default that’s what gets settled.

The effect is not marginal:

Exposure without netting:        399,787
Exposure with netting:            20,020
Reduction:                          95.0%

Two nearly offsetting trades: gross exposure of 400k, net exposure of 20k. A 95% reduction from a legal document.

This is why CVA is not additive across trades, and why the question “what’s the CVA of this trade?” is meaningless in isolation. The right question is incremental: how much does the netting set’s CVA change if I add this trade? A new trade that offsets existing risk can have negative incremental CVA — it reduces the charge, and you can price it more aggressively as a result.

That’s the piece that connects CVA to the trading floor rather than the back office. It’s why the CVA desk gets consulted before a large trade is quoted.

Two things that will trip you up

The default probabilities are risk-neutral, not historical. CVA is a price, so it uses probabilities backed out of CDS spreads — and those embed a risk premium. They’re systematically higher than observed default frequencies, often by a factor of two or more. Using historical default rates gives you an expected loss, which is a risk number, not a price. Both are legitimate; they answer different questions, and the difference is the same P versus Q distinction that runs through everything else in derivatives pricing.

Exposure and default are not independent. The formula above quietly assumes they are. Often they’re not. If you’ve sold protection on an oil producer to a bank whose loan book is full of oil producers, your exposure grows in precisely the scenarios where they’re most likely to fail. That’s wrong-way risk, it can multiply your CVA severalfold, and the standard formula misses it entirely. Right-way risk is the benign version and is rarer than people hope.

Where CVA sits in the family

CVA was first, and then the same logic got applied everywhere:

  • DVA — the mirror image: the benefit you get from your own possible default. Real, controversial, and it produces the uncomfortable result that your derivatives book gains value as your own credit deteriorates.
  • FVA — the cost of funding the collateral you post on hedges when the client trade itself is uncollateralised.
  • MVA — the cost of funding initial margin.
  • KVA — the cost of the regulatory capital the trade consumes over its life.

Collectively, XVA. They exist because the risk-free price was never the real price, and 2008 made the gap impossible to ignore. Every one of them is the same structural move: simulate the exposure, price a cost against it, charge it at inception.

What to take away

CVA is not a spread you add. It’s an option on your counterparty’s default, struck at an exposure you have to simulate, priced with market-implied default probabilities, and computed at the netting set rather than the trade.

Get those four things straight and the rest is implementation detail — heavy implementation detail, but detail.

The machinery underneath — Monte Carlo simulation, exposure paths, risk-neutral valuation, and the validation to know your numbers are right — is what we build in Risk-Neutral Valuation. CVA is where all of it stops being academic and starts having a P&L attached.


Get the Quant Reference Card — four pages covering stochastic calculus, measure change, the models you’ll actually meet, discretisation, rates, credit and XVA, with the practitioner notes that don’t make it into textbooks. Free.