Algorithm 2 from Deep xVA Solver - A Neural Network Based Counterparty Credit Risk Management Framework computes non-recursive valuation adjustments (CVA and DVA) by combining the Deep BSDE Solver for clean value simulation with an outer Monte Carlo estimator. The procedure exploits the fact that CVA and DVA can be expressed as time integrals of known functionals of the clean portfolio value, without any feedback from the adjustment itself.
The algorithm proceeds in two stages. First, Algorithm 1 (the exposure simulation step) trains one neural network per portfolio constituent m = 1, …, M by applying the Deep BSDE Solver to the clean value BSDE for each claim. This produces optimised parameters (xi_m*, rho_m*) that define the approximate clean value and hedging strategy along simulated paths. Second, P fresh Monte Carlo paths of the clean portfolio value are generated using the trained networks, and the adjustment is estimated by the empirical average of a quadrature approximation to the exposure integral. For CVA, the integrand involves the discounted expected negative exposure weighted by the counterparty’s loss-given-default and default intensity; for DVA, it involves the positive exposure weighted by the bank’s loss-given-default and intensity.
This two-stage structure is computationally efficient because the inner optimisation (training the networks) is performed only once, after which arbitrarily many outer paths can be simulated at low marginal cost. The a posteriori error bound (Eq. 3.15) shows that the total error decomposes into a time discretisation error of order sqrt(Delta_t) plus terms depending on the terminal losses of the individual clean value BSDEs. This bound is practically useful because the terminal losses are observable outputs of the optimisation.
Key Details
- Non-recursive adjustments satisfy: CVA_0 = E[integral of Phi(clean value) dt], where Phi encodes default intensity, recovery, and exposure
- The rectangle quadrature rule introduces error of order sqrt(Delta_t) due to the 1/2-Holder continuity of the integrand
- P (outer paths) is typically 2048; L (inner/training paths) is typically 1024; these can differ
- The trained networks are reused for the outer simulation, avoiding retraining
- Applicable when the collateral depends only on clean values (the typical practical case), making ColVA also non-recursive
- For the 100-dimensional basket option, Algorithm 2 produces CVA/DVA estimates that agree with Algorithm 3 within Monte Carlo confidence intervals