Basic Prerequisites: Stochastic Calculus & Itô’s Lemma.
1. Intuition & Practical Objective
This page builds the why of counterparty credit risk and xVA with no prior derivatives-knowledge needed. The objective is one idea: a derivative is a two-way promise, so both parties carry default risk against each other; that risk (and its funding/capital consequences) has a price, and the xVA formulas are how that price is computed.
Start with the dumbest question: why is counterparty risk different for a derivative than for a loan? When you lend $100, the most you can lose is the $100, and you know that number today. When you enter a 10-year interest-rate swap, the amount your counterparty might owe you is unknown today and changes every day as rates move. Either of you can be owed money at any point in the swap’s life. This is the defining feature of counterparty credit risk (CCR): exposure is uncertain and symmetric (Gregory Ch 3.1). Unlike lending risk, both parties carry it.
Three steps:
-
Exposure is a function of the future value of the derivative. Define = the value of your portfolio at time . If your counterparty defaults at and , you lose (roughly) - that is your positive exposure. If , you owe them; their default doesn’t hurt you (the claim dies with them - which is your own-default “benefit”, the seed of DVA). So exposure is asymmetric around the current value, even though itself is symmetric.
-
A derivative’s value can be positive or negative, so netting and margin are the two tools that reshape exposure. Sign many trades with one counterparty under one master agreement and only the net value is exposed (netting). Post collateral to cover the running value (variation margin) and initial margin against future moves, and the residual exposure shrinks to the gap over the margin period of risk (MPoR) - the days between the last margin call and close-out. Exposure is the raw material every xVA term is built on.
-
An xVA is a price, not a risk measure. Credit Value Adjustment (CVA) is the price of the counterparty-risk embedded in a trade; DVA is the mirror image from your own default; FVA/MVA price the funding of margin; KVA prices the regulatory capital. Each is a valuation adjustment added to the clean default-free price. The whole field is called xVA - the x is a placeholder for C/D/F/M/K/Col.
The core identity you will meet everywhere. A counterparty default costs you: the exposure at default × the probability of default × the loss given default. Integrated over all future default times, that is CVA. Every other adjustment is the same “profile × cost” product with different ingredients.
2. Mathematical Ground Truth & Derivations
The worked five-scenario example (Gregory Spreadsheet 11.1) - the whole framework in one table.
Suppose at a future horizon the portfolio value has five equally-likely scenarios: . From these we read off every exposure metric:
| Metric | Formula | Here |
|---|---|---|
| EFV (expected future value) | ||
| PFE (potential future exposure) | highest value | |
| EPE (expected positive exposure) | ||
| ENE (expected negative exposure) |
Note the identity EPE + ENE = EFV: . Positive exposure and negative exposure partition the value, so their expectations sum to the expected value. This one identity powers the entire xVA framework - it is why FVA can be split into FCA (cost, from EPE) and FBA (benefit, from ENE).
From exposure to a CVA number. The discrete CVA (Gregory Eq 17.3) is
The default probability comes from the credit market: if the counterparty’s spread is and , the implied default intensity is (Hull 24.2; BM 21.25), and the survival probability is . So CVA is literally the product of a market quantity (EPE) and a credit quantity (PD × LGD) - the market-risk and credit-risk halves of the trade.
3. Computational Implementation - exposure from scenarios, then a first CVA
The five scenarios are hand-computable; the CVA needs a credit curve. Stdlib only.
The EPE + ENE = EFV check is visible in the outputs (30 + (−8) = 22), and the CVA is just the exposure times a credit number - the two halves of this folder.
4. Failure Modes & First-Principles Breakdowns
- Exposure ≠ value. It is tempting to think “the bigger the swap value, the bigger the risk” - wrong. A swap deep out-of-the-money for you () has almost no counterparty exposure (your ENE is negative), yet it still carries own-default (DVA) and funding (FVA) consequences. Exposure is asymmetric; value is not.
- Recovery excluded by convention. EPE is a gross loss at default - the convention excludes any recovery from the exposure measure (recovery enters separately via LGD). Beginners double-count recovery by netting it off the exposure.
- Exposure is conditional on default, usually ignored. The “true” exposure is . Pricing it unconditionally (with EPE computed from market paths alone) silently assumes no wrong-way risk - the failure mode of 05 · Failure Modes.
5. References
- Gregory, The xVA Challenge
- Hull, Options, Futures, and Other Derivatives
- Brigo & Mercurio, Interest Rate Models
6. Connected Graph Bridges
- Base: Stochastic Calculus & Itô · Black–Scholes–Merton
- Continue: 02 · Exposure & Margin · Index Hub