Class ExposureProfile

java.lang.Object
com.quantfinlib.credit.ExposureProfile

public final class ExposureProfile extends Object
Output of MultiCurrencyExposureSimulator: per exposure date, the profile statistics, and per path, the discounted exposures the wrong-way CVA in CvaApproximator needs.

Definitions (Gregory, The xVA Challenge, 3rd ed., 2015, ch. 7), with E(t) = max(V(t) - C(t), 0) the collateralised positive exposure, N(t) = max(C(t) - V(t), 0) the negative exposure and D(0,t) the simulated stochastic discount factor:

  • Method Details

    • timesLength

      public int timesLength()
      Number of exposure dates.
    • time

      public double time(int i)
      Exposure date i in years.
    • timesCopy

      public double[] timesCopy()
      Copy of the exposure dates.
    • paths

      public int paths()
      Number of simulated paths.
    • discountedExpectedExposure

      public double discountedExpectedExposure(int i)
      E[D(0,t_i) E(t_i)].
    • discountedExpectedExposureStdError

      public double discountedExpectedExposureStdError(int i)
      Monte Carlo standard error of discountedExpectedExposure(int).
    • discountedExpectedNegativeExposure

      public double discountedExpectedNegativeExposure(int i)
      E[D(0,t_i) N(t_i)], positive.
    • expectedExposure

      public double expectedExposure(int i)
      Forward-measure EE at date i: discounted EE over P(0, t_i).
    • expectedNegativeExposure

      public double expectedNegativeExposure(int i)
      Forward-measure ENE at date i, positive.
    • expectedExposureCopy

      public double[] expectedExposureCopy()
      Copy of the forward-measure EE profile.
    • pfe

      public double pfe(int i, double q)
      Potential future exposure: the lower empirical q-quantile of E(t_i).
      Parameters:
      i - date index
      q - quantile in (0, 1), e.g. 0.95 or 0.99
      Returns:
      PFE at date i
    • epe

      public double epe()
      Time-weighted average of the forward-measure EE over (0, t_m].