Class CounterpartyExposureTracker

java.lang.Object
com.quantfinlib.risk.CounterpartyExposureTracker

public final class CounterpartyExposureTracker extends Object
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.

  • Constructor Details

    • CounterpartyExposureTracker

      public CounterpartyExposureTracker()
      Creates an instance; the explicit form of the default constructor.
  • Method Details

    • addTrade

    • currentExposure

      public double currentExposure(String counterparty)
      Net current exposure (MTM netted within the counterparty netting set, floored at 0).
    • potentialFutureExposure

      public double potentialFutureExposure(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. 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

      public double totalExposure(String counterparty)
      Total exposure = current + potential future.
    • allExposures

      public Map<String,Double> allExposures()
      Total exposure per counterparty (insertion order preserved).
    • addOnFactor

      public static double addOnFactor(double tenorYears)
      BIS CEM-style FX add-on factor by residual tenor.