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 (BIS current-exposure-method style FX factors: <1y 1%, 1–5y 5%, >5y 7.5%).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Constructor Summary
Constructors -
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()
-
-
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.
-