Exposure: EE, EPE & PFE
Turn future values into counterparty exposure profiles.
01Distinguish EE, EPE and PFE
02Apply netting and collateral
03Build a time-indexed exposure profile
Define the exposure before compressing it into a metric.
Exposure is the positive part of future portfolio value after legally effective netting and collateral.
EE is a time-specific mean.
EPE averages EE over the horizon.
PFE is a quantile, not an expectation.
Fix portfolio, scenarios, horizon, and legal terms.
Counterparty limits, CVA and collateral management depend on the full distribution of future replacement cost.
swap netting sets
FX forwards
cleared portfolios
Exposure is in reporting currency after CSA netting; PFE confidence is displayed.
Aggregate with an explicit measure and convention.
Expected exposure
Average unsecured replacement cost at future time t.
Short derivation
From information set to computable quantity
Each line states the information, measure and unit before manipulating the expression.
- 01
Simulate risk factors
Generate correlated market states on future exposure dates.
- 02
Revalue the netting set
Price every trade consistently at each scenario-date node.
- 03
Apply CSA collateral
Model thresholds, minimum transfer amount, lag and margin period of risk.
- 04
Aggregate distribution
Compute mean and quantile by date, then integrate EE for EPE.
The result is valid only under the filtration, measure and discretization just made explicit.
Inputs
Vₜ: future netting-set valueEE(t)=E[(Vₜ−Cₜ)⁺]
Assumptions and limits
- The interactive profile is synthetic and educational.
- Real CSA mechanics include disputes, lags and collateral optionality.
Potential future exposure
A high quantile used for limits, not an additive capital measure.
Reconcile valuation, risk, and model limitations.
Simulate future market states, revalue at each node, apply legal netting/CSA rules and summarize positive exposure by date.
Calibrate market dynamics and default inputs separately; wrong-way dependence requires a joint model.
06PYTHON IMPLEMENTATIONOpen the implementation and checks.
- Typed domain validation
- Deterministic seeded computation
- Readout plus invariant
Exposure: EE, EPE & PFE
Reproduce the governing quantity, then challenge it with an invariant.
import numpy as np def eetmathbbevtct(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 = eetmathbbevtct(sample)assert sample.min() <= value <= sample.max()print(f"value={value:.6f}")Move the state. Challenge the equation.
Exposure: EE, EPE & PFE
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
2.55mDecision metric with explicit convention
Turn exposure into a controlled decision.
“Netting is a legal fact before it is a modelling input.”
netting agreement
CSA terms
market scenarios
Calibrate market dynamics and default inputs separately; wrong-way dependence requires a joint model.
RISKwrong-way risk
margin-period exposure
- 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.
transmitswidens future values
transmitsclips unsecured exposure
outputdrives counterparty limits
10COMMON PITFALLSOpen the failure checklist.
Summing trade-level PFEs
Applying netting across legal sets
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