Class CounterpartyExposureTracker
java.lang.Object
com.quantfinlib.risk.CounterpartyExposureTracker
Counterparty credit exposure modeling with netting:
- Current exposure — max(0, net mark-to-market) per netting set.
- Potential future exposure — notional add-ons by tenor bucket
using the FX/gold factors of the Basel Current Exposure Method
(1988 Accord Annex 3 as amended in 1995: <1y 1%, 1–5y 5%,
>5y 7.5%), applied to every trade whatever its
product.
CEM was replaced for regulatory capital by SA-CCR (BCBS 279, 2014; in force from 2017 to 2021 by jurisdiction), which uses supervisory deltas, hedging sets, maturity factors and a multiplier on collateral. This class is a CEM-vintage netting estimate for monitoring, not a regulatory EAD.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance; the explicit form of the default constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleaddOnFactor(double tenorYears) BIS CEM-style FX add-on factor by residual tenor.Total exposure per counterparty (insertion order preserved).doublecurrentExposure(String counterparty) Net current exposure (MTM netted within the counterparty netting set, floored at 0).doublepotentialFutureExposure(String counterparty) Potential future exposure with the CEM net-to-gross adjustment:PFE = (0.4 + 0.6 * NGR) * sum |notional| * addOn, where NGR = net current exposure / gross positive MTM.doubletotalExposure(String counterparty) Total exposure = current + potential future.
-
Constructor Details
-
CounterpartyExposureTracker
public CounterpartyExposureTracker()Creates an instance; the explicit form of the default constructor.
-
-
Method Details
-
addTrade
-
currentExposure
Net current exposure (MTM netted within the counterparty netting set, floored at 0). -
potentialFutureExposure
Potential future exposure with the CEM net-to-gross adjustment:PFE = (0.4 + 0.6 * NGR) * sum |notional| * addOn, where NGR = net current exposure / gross positive MTM. A well-hedged netting set (offsetting MTMs) earns up to a 60% add-on reduction — the gross add-on alone materially over-states exposure for exactly the books that hedge, which is what the netting agreement is for. NGR is 1 (no relief) when there is no positive MTM to net against. -
totalExposure
Total exposure = current + potential future. -
allExposures
-
addOnFactor
public static double addOnFactor(double tenorYears) BIS CEM-style FX add-on factor by residual tenor.
-