Class ExposureProfile
java.lang.Object
com.quantfinlib.credit.ExposureProfile
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:
discountedExpectedExposure(int)= E[D(0,t) E(t)], the quantity CVA integrates;expectedExposure(int)= E[D(0,t) E(t)] / P(0,t), the forward-measure EE; with deterministic rates it is plain E[E(t)];expectedNegativeExposure(int)likewise for N (reported as a positive number), the input to DVA;pfe(int, double): the q-quantile of the undiscounted E(t) across paths (lower empirical quantile);epe(): time average of EE over (0, t_m], each date's EE weighted by the length of the bucket it closes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumMarket factor used as the wrong-way driver. -
Method Summary
Modifier and TypeMethodDescriptiondoublediscountedExpectedExposure(int i) E[D(0,t_i) E(t_i)].doubleMonte Carlo standard error ofdiscountedExpectedExposure(int).doubleE[D(0,t_i) N(t_i)], positive.doubleepe()Time-weighted average of the forward-measure EE over (0, t_m].doubleexpectedExposure(int i) Forward-measure EE at date i: discounted EE over P(0, t_i).double[]Copy of the forward-measure EE profile.doubleexpectedNegativeExposure(int i) Forward-measure ENE at date i, positive.intpaths()Number of simulated paths.doublepfe(int i, double q) Potential future exposure: the lower empirical q-quantile of E(t_i).doubletime(int i) Exposure date i in years.double[]Copy of the exposure dates.intNumber of exposure dates.
-
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 ofdiscountedExpectedExposure(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 indexq- 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].
-