CVA, DVA & FVA
Integrate exposure, default and funding without double counting.
01Derive unilateral CVA
02Separate CVA, DVA and FVA components
03Diagnose double counting
Define the exposure before compressing it into a metric.
xVA is a portfolio-level adjustment framework whose ingredients must share exposure, discounting and survival conventions.
CVA prices counterparty default loss.
DVA reflects own-default benefit under a chosen framework.
FVA depends on funding policy and collateral.
Fix portfolio, scenarios, horizon, and legal terms.
Uncollateralized derivative prices and new-deal charges require consistent counterparty and funding adjustments.
OTC derivatives
netting sets
secured funding
Loss given default, marginal default probability and discount factors share one timeline.
Aggregate with an explicit measure and convention.
Discrete CVA
Discounted expected positive exposure is weighted by marginal default loss.
Full derivation
From information set to computable quantity
Each line states the information, measure and unit before manipulating the expression.
- 01
Condition on default interval
Partition first default time into future buckets.
- 02
Apply close-out loss
Loss equals LGD times positive close-out exposure.
- 03
Weight and discount
Multiply conditional exposure by marginal default probability and discount factor.
- 04
Reconcile adjustments
Specify close-out, funding and collateral assumptions once to prevent overlap.
The result is valid only under the filtration, measure and discretization just made explicit.
Inputs
LGD=1−RdPD(t): marginal default probability
Assumptions and limits
- FVA is framework- and policy-dependent.
- Replacement close-out and own default require governance decisions.
Funding adjustment
Funding requirement is integrated against the relevant funding spread.
Reconcile valuation, risk, and model limitations.
Integrate discounted exposure profiles against survival/default and funding curves under one close-out convention.
Bootstrap hazard from liquid credit instruments and document recovery, wrong-way and funding assumptions.
06PYTHON IMPLEMENTATIONOpen the implementation and checks.
- Typed domain validation
- Deterministic seeded computation
- Readout plus invariant
CVA, DVA & FVA
Reproduce the governing quantity, then challenge it with an invariant.
import numpy as np def cvaapproxrsumidfie(x: np.ndarray) -> float: x = np.asarray(x, dtype=float) assert np.isfinite(x).all() return float(np.mean(x)) sample = np.array([0.8, 1.0, 1.2])value = cvaapproxrsumidfie(sample)assert sample.min() <= value <= sample.max()print(f"value={value:.6f}")Move the state. Challenge the equation.
CVA, DVA & FVA
Change scale, volatility, collateral and confidence. Exposure, tail and adjustment metrics respond from one synthetic portfolio.
Expected and potential future exposure, before and after collateral.
- EE
- PFE
- collateralized EE
Use Left/Right or Up/Down arrows to inspect values; Home and End jump to the bounds.
View chart data
| future year | EE | PFE | collateralized EE |
|---|---|---|---|
| 0.0Y | 0.000m | 0.000m | 0.000m |
| 0.1Y | 0.248m | 1.021m | 0.248m |
| 0.3Y | 0.341m | 1.406m | 0.341m |
| 0.4Y | 0.407m | 1.677m | 0.350m |
| 0.5Y | 0.457m | 1.884m | 0.350m |
| 0.6Y | 0.497m | 2.048m | 0.350m |
| 0.8Y | 0.529m | 2.179m | 0.350m |
| 0.9Y | 0.554m | 2.285m | 0.350m |
| 1.0Y | 0.574m | 2.369m | 0.350m |
| 1.1Y | 0.590m | 2.434m | 0.350m |
| 1.3Y | 0.602m | 2.483m | 0.350m |
| 1.4Y | 0.610m | 2.517m | 0.350m |
| 1.5Y | 0.616m | 2.538m | 0.350m |
| 1.6Y | 0.618m | 2.548m | 0.350m |
| 1.8Y | 0.617m | 2.546m | 0.350m |
| 1.9Y | 0.615m | 2.534m | 0.350m |
| 2.0Y | 0.609m | 2.512m | 0.350m |
| 2.1Y | 0.602m | 2.482m | 0.350m |
| 2.3Y | 0.592m | 2.443m | 0.350m |
| 2.4Y | 0.581m | 2.395m | 0.350m |
| 2.5Y | 0.568m | 2.341m | 0.350m |
| 2.6Y | 0.553m | 2.279m | 0.350m |
| 2.8Y | 0.536m | 2.209m | 0.350m |
| 2.9Y | 0.517m | 2.134m | 0.350m |
| 3.0Y | 0.498m | 2.051m | 0.350m |
| 3.1Y | 0.476m | 1.963m | 0.350m |
| 3.3Y | 0.453m | 1.868m | 0.350m |
| 3.4Y | 0.429m | 1.768m | 0.350m |
| 3.5Y | 0.403m | 1.662m | 0.350m |
| 3.6Y | 0.376m | 1.550m | 0.350m |
| 3.8Y | 0.348m | 1.433m | 0.348m |
| 3.9Y | 0.318m | 1.311m | 0.318m |
| 4.0Y | 0.287m | 1.184m | 0.287m |
| 4.1Y | 0.255m | 1.052m | 0.255m |
| 4.3Y | 0.222m | 0.916m | 0.222m |
| 4.4Y | 0.188m | 0.774m | 0.188m |
| 4.5Y | 0.152m | 0.628m | 0.152m |
| 4.6Y | 0.116m | 0.478m | 0.116m |
| 4.8Y | 0.078m | 0.323m | 0.078m |
| 4.9Y | 0.040m | 0.163m | 0.040m |
| 5.0Y | 0.000m | 0.000m | 0.000m |
Scenario → distribution → decision
Legal terms and model state enter before the summary metric and its governance action.
18.00% volSynthetic market scenarios
0.35mUnsecured exposure boundary
0.008mDecision metric with explicit convention
Turn exposure into a controlled decision.
“If two adjustments charge the same funding exposure, the spreadsheet is not conservative—it is inconsistent.”
EE/ENE profiles
hazard curves
funding spreads
Bootstrap hazard from liquid credit instruments and document recovery, wrong-way and funding assumptions.
RISKCVA spread
funding basis
- Validate market state and timestamp
- Recompute the baseline
- Run a controlled perturbation
- Explain P&L and residuals
Production failure modes
- Silent convention or measure changes
- Unstable numerics hidden by plausible prices
09MACRO CONNECTIONOpen the transmission channel.
Transmission from state to valuation
The causal chain separates the economic shock from the modelling response.
transmitsmoves marginal PD
transmitssets loss amount
outputchanges fair-value adjustment
10COMMON PITFALLSOpen the failure checklist.
Using cumulative PD in every bucket
Adding FVA without a funding convention
11SOURCES / FURTHER READINGOpen sources and continue the track.
Exposure, counterparty credit and xVA notebooks
The lesson uses original prose and a fresh typed implementation; the linked material is a research map, not copied product code.
- Source
- Financial Engineering: Interest Rates & xVA
- Author
- L. A. Grzelak
- Ref
- main