Algorithm 3 from Deep xVA Solver - A Neural Network Based Counterparty Credit Risk Management Framework extends the non-recursive approach (Algorithm 2 - Deep xVA for non-recursive adjustments) to handle recursive valuation adjustments such as FVA, where the adjustment itself appears in its own BSDE driver. The algorithm applies the Deep BSDE Solver twice in succession: first to learn the clean portfolio values, and then to solve the xVA BSDE directly.

In the first step, Algorithm 1 trains neural networks to approximate the clean values of all M portfolio constituents along simulated paths. In the second step, a new family of neural networks (psi_n^zeta) is introduced to parametrise the control of the xVA BSDE. The driver of this BSDE depends on the clean portfolio value paths generated in step one, and the terminal condition is XVA_T = 0. The optimisation minimises E[|XVA_N|^2] (the squared terminal value, which should be zero) over the initial value gamma and network parameters zeta, subject to the discretised xVA BSDE dynamics. The resulting optimiser gamma* gives the time-zero xVA, while the trained networks provide both the xVA trajectory along paths and the xVA hedge ratios.

This two-step procedure is essential for FVA because the funding cost depends on the total portfolio value V = clean value - XVA, creating a circular dependence. The recursive structure means that FVA cannot be computed by a simple outer expectation over clean values. The a posteriori error bound for Algorithm 3 shows that the xVA approximation error depends on the time discretisation error, the terminal losses from the clean value BSDEs, and the terminal loss of the xVA BSDE itself. The method also naturally produces dynamic risk measures (VaR, Expected Shortfall) on xVA by evaluating quantiles over the simulated xVA paths, without nested simulation.

Key Details

  • The xVA BSDE network architecture (R-bar parameters) can differ from the clean value networks (R parameters)
  • For FVA of a forward on a 200-dimensional basket, the error remains below 1% with CPU time of ~3918 seconds
  • The method validated by comparing Algorithm 2 and Algorithm 3 on non-recursive cases (d=100 basket: 0.8947 vs 0.8952)
  • VaR on xVA computed as a by-product: at terminal time T, VaR(XVA_T) = XVA_0 since XVA_T = 0, providing a self-consistency check
  • FVA increases with the funding spread and decreases with the level of collateralisation, as theoretically expected
  • Can be extended to multiple recursive valuations (e.g., the balance-sheet xVA model of Albanese et al., 2021) by chaining additional BSDE solves

method