Basic Prerequisites: Stochastic Calculus & Itô and Black–Scholes–Merton. (these are the folder-level prerequisites for pages 02–06; page 01 states its own, smaller, entry requirements)
Scope note - two views of xVA. This is the pricing/desk view: how CVA/DVA/FVA enter the price of a derivative and how a desk marks and hedges xVA. The complementary risk/regulatory view - capital, netting sets, SA-CCR, wrong-way risk as a risk-management problem - lives at Pillar 4 · Counterparty Risk & xVA. Same mathematics, different job; use this folder to price, that one to govern.
1. Intuition & Practical Objective
Every OTC derivative is a bilateral contract that can run for decades, and either party can be in-the-money at any future time. Counterparty credit risk (CCR) is the risk that the party who owes you money at a given moment defaults before paying it. Unlike a bond - where the exposure is (roughly) the par amount, known today - a derivative’s exposure is uncertain and symmetric: it evolves with the market and can flip sign. That uncertainty is exactly what the xVA world exists to price.
This folder is the counterpoint to the Black–Scholes–Merton folder. There, one asset, one volatility, and the price is fixed by no-arbitrage. Here, the pricing question is: what does the counterparty’s default, my own default, the funding of margin, and the cost of regulatory capital add to (or subtract from) that clean price? The answers are the valuation adjustments - CVA, DVA, FVA, MVA, KVA, ColVA - and the object that bundles them, the xVA (the subject of Gregory’s The xVA Challenge, the primary source for this folder).
This page is a hub: it (a) gives you the fast formula lookup below (job #1 of this pillar), and (b) routes you to six sub-pages that walk from raw intuition, through exposure & margin, the CVA/DVA and FVA/MVA formulas, the failure modes, and the practitioner extensions (capital, the xVA desk, wrong-way risk).
The one-sentence essence. “Price counterparty and funding risk as the time-integral of a utilisation profile (EPE, ENE, EFV, EIM) against a cost curve (credit spread, funding spread, cost of capital): CVA = LGD × E[EPE × PD], and every other xVA term is the same product with a different market and cost component.”
2. Mathematical Ground Truth & Derivations
Quick-Reference Lookup (job #1). All formulas below are transcribed from Gregory (2020) - Ch 11 (exposure), Ch 17 (CVA/DVA), Ch 18 (FVA), Ch 20 (MVA), Ch 13 (capital), Ch 9 (SIMM) - and cross-checked against Hull Ch 24 (credit risk, Merton) and Brigo–Mercurio Ch 21–22 (intensity models). The numbers in the check column were re-executed and reproduced exactly from the verified corpus (see §3).
Notation: value of the derivative, positive (credit) exposure, negative exposure, / counterparty default intensity/spread, loss-given-default , default probability over an interval, funding spread, (OIS) risk-free rate, standard-normal pdf/cdf, inverse normal.
Master identities (each xVA = market component × cost component, Gregory Table 3.1):
| xVA | Market component (utilisation) | Cost component | Formula |
|---|---|---|---|
| CVA | counterparty PD × LGD | ||
| DVA | (≤0) | own PD × LGD | |
| FVA | funding spread | ||
| MVA | IM funding spread | ||
| KVA | cost of capital |
Exposure lookup (normal case, , - Gregory App. 11A):
| Quantity | Formula | Verified check |
|---|---|---|
| EFV (expected future value) | ||
| EPE (expected positive exposure) | ✓ | |
| ENE (expected negative exposure) | ✓ | |
| PFE (potential future exposure, =VaR) | ✓ |
Credit lookup (CVA, Hull 24 / Gregory 17 / BM 21): hazard from spread (Hull 24.2; BM 21.25) · survival · Merton , default (Hull 24.3–24.4).
| Quantity | Formula | Verified check |
|---|---|---|
| Unilateral CVA (Eq 17.3) | flat , 150bp, , 5y ✓ | |
| Bilateral CVA (Eq 17.7a) | stylised 5y swap | |
| CVA as a spread (Eq 17.4) |
Funding & margin lookup (Gregory 18 / 20 / 9):
| Quantity | Formula | Verified check |
|---|---|---|
| FVA = FCA + FBA (18.4) | ✓ | |
| MVA (20.1) | EIM profile, 100bp | |
| Variance-covariance IM (9.4.3) | 99% 10-day ✓ | |
| BA-CVA capital (13.3) | ✓ |
Critical caveat. CVA is a netting-set-level quantity (marginal, not additive across trades), whereas symmetric FVA is trade-level additive; MVA/KVA are portfolio/asset-class level. Mixing these aggregation levels is the single most common xVA error (see 05 · Failure Modes).
3. Computational Implementation - the xVA formula engine
This runs on the standard library only (math.erf gives the normal CDF; the inverse is a few lines of bisection). It reproduces every verified number above, then computes a CVA from scratch - the exact product market (EPE) × credit (PD) × loss (LGD) that is this entire folder.
4. Failure Modes & First-Principles Breakdowns
Hub signposts - the folder’s failure-mode analysis lives in 05 · Failure Modes. In one line each:
- Independence delusion (no wrong-way risk) - almost every basic CVA assumes exposure, PD and LGD are independent; when default and exposure move together (wrong-way risk), CVA is structurally underpriced (corr +50% ≈ doubles EPE).
- Double-counting DVA with FBA - counting the benefit of a negative exposure twice (once as own-default, once as funding benefit) double-discounts it; choose one consistent framework.
- Wrong aggregation level - applying a trade-level FVA formula to a netting-set CVA (or vice-versa) silently misprices by a portfolio factor.
5. References
- Gregory, Jon: The xVA Challenge: Counterparty Credit Risk, Funding, Collateral and Capital (4th ed., Wiley 2020) - the primary source for this folder:
- Hull, John C.: Options, Futures, and Other Derivatives (11th ed.)
- Brigo, Damiano & Fabio Mercurio: *Interest Rate Models
- Green, Andrew: XVA: Credit, Funding and Capital Valuation Adjustments (Wiley 2015)
6. Connected Graph Bridges
- Foundational base: Stochastic Calculus & Itô · Black–Scholes–Merton (the clean, default-free price xVA adjusts)
- Related credit: Credit Risk & the Merton Structural Model · VaR & Expected Shortfall (PFE = VaR)
- Market context: Interest Rate & Term Structure Models (swap exposure is the canonical EPE profile)
- Sub-pages (in-folder): 01 From Zero · 02 Exposure & Margin · 03 CVA & DVA · 04 FVA & MVA · 05 Failure Modes · 06 Advanced Extensions