This project is a Python demonstrator for the stochastic grid bundling method (SGBM) to solve backward stochastic differential equations (BSDE) (see, using the particular case of XVA calculation with Black-Scholes model. It makes use of parallel computing with the CUDA Python platform ( to increase the efficiency of the algorithm. While the functions in this project are tailored to the specific problem of XVA, it can be adapted to general Lipschitz BSDEs with proper modification.