RT @IHSMarkit: Today marks International Day of Persons with Disabilities. At IHS Markit, we have created a safe space for this community t…
xVA Neural Net Engine - Machine Learning Accelerated xVA Simulations
By Anup Aryan
At IHS Markit, we are continually seeking ways to accelerate xVA computations and deliver xVA valuations and sensitivities which meet and exceed the ever-growing challenges of modern financial risk pricing. In recent years, neural networks and machine learning have revolutionized a wide array of computationally intensive modelling tasks, from self-driving cars to speech recognition, all while delivering exceptional prediction performance. Inspired by these recent advances, we have applied machine learning techniques to xVAs to address some of the toughest modelling and performance challenges in financial markets to date. The result is the xVA Neural Net Engine, a high speed xVA pricer based on neural net modelling and accelerated GPU computing, which delivers accurate xVA valuations many orders of magnitude faster than traditional methods.
Credit, funding and capital valuation adjustments, collectively known as the xVAs, are costs which banks face when entering derivative transactions or managing existing positions. Standard xVAs include Credit Valuation Adjustment (CVA) and Funding Valuation Adjustment (FVA). The lifetime cost of margin funding, or Margin Valuation Adjustment (MVA), has come into focus as markets and regulations have moved towards requiring initial margin (IM).
The challenge that banks face, and have faced for many years, is that the calculation of the xVAs is a computationally demanding task as it requires a Monte Carlo simulation to project future values of the portfolio. This can be very computationally expensive for a large portfolio or for portfolios containing exotic trades requiring numerical methods for pricing. Compounding the computational expense is the fact that traders need market sensitivities of these xVAs in order to properly hedge the bank's exposure. If a bump and revalue approach is used for sensitivities these Monte Carlo simulations need to be run hundreds of times to calculate all the required sensitivities.
Pricing MVA is particularly challenging when using the ISDA SIMM approach to compute the initial margin. SIMM is based on the portfolio sensitivities, so to project IM to future time steps we must project portfolio sensitivities into the future within the Monte Carlo simulation. This is an order of magnitude increase in the number of valuations required from the pricing models. As MVA costs become a significant contributor to xVAs there may be a need to compute MVA sensitivities to explain the movements in the MVA costs, and possibly hedge the fluctuations in these costs. This would lead to a sensitivities of sensitivities situation and the corresponding compounding computational challenges. It is very difficult to implement this level of computation using traditional modelling methods.
Current state of the art in the industry usually involves invoking large distributed computing hardware stacks running for many hours to complete all the calculations required for each day. While the hardware stacks are quite powerful, there is still often a need for approximations or simplified product pricing models to compute the xVAs. The computational expense usually means these measures are computed just once a day, whereas the ability to rapidly compute them on demand for deal time decision making would be ideal for the industry.
xVA and AI
Portfolio xVA computation can be broken down into three broad steps: trade valuation, aggregation and risk measure calculation. In the computation xVAs, the costliest component is the valuation of trades on future Monte Carlo scenarios. It is this step we seek to accelerate. In our approach, we train neural networks (NN) to learn the pricing functions. The trained neural nets are then used as a replacement to the original pricing model. In this approach, instrument prices are computed as a forward pass, or inference, of the network which can be computed very quicky on accelerated hardware.
Neural nets are an excellent tool for replicating derivative pricing functions. First, they excel at high dimensional problems (large number of inputs and outputs), and second, they can support nonlinear dependencies in the training data. Additionally, typical application of NNs must contend with the issue of overfitting. In this application, we are training to well defined mathematical functions that produce no noise, as such overfitting is not a concern, and high-quality replication of the pricing function can be obtained with sufficient data and training.
For each product type we train a unique neural network. The inputs to the NN are the values of all the relevant market data used to price the product, time-to-maturity of the product, as well as other product specific parameters such as strike price or tenor. The output is the PV of the product. Training a deep neural network for each product type allows us to fine tune the inputs and the design of the neural network to obtain an accurate replication of the pricing function with a modest amount of training.
Training neural networks also requires large amounts of training data which can be difficult to source in many applications. In our application, training data is generated by sampling input market data and running our in-house xVA pricing engine to produce forward valuations. The input data must be augmented to cover a wide range of input states. We use a combination of historical sampling and Monte Carlo simulation to generate the data. The result is a large training dataset with a wide coverage of the input/output space ready for NN training. It is important to note that data generation and model training can be expensive steps, however, they are one-time upfront costs and are not relevant to deal time xVA computation.
Once trained, the neural nets are deployed in pricing in the Neural Net xVA Engine. To compute portfolio xVAs, all future valuations are computed as an inference (or predict) of the neural net. Prices can then be aggregated and xVAs calculated. This approach is extremely performant as the inference is a highly vectorized computation run on the GPU. In fact, pricing, aggregation and xVA computation are all run on the GPU. This allows us to leverage the extreme compute capabilities of GPUs across all phases of xVA simulation.
While the compute performance is extreme, the accuracy is also very high. For example, we can compare expected exposures for a portfolio of vanilla and cross-currency swaps across four currencies. We show the expected positive and negative exposures below, comparing the valuation from the traditional style instruments (shown as Actual) against the Neural Net (NN) engine.
We can also drill down to scenario level exposures. Below, we show 50 scenario paths, once again comparing the valuation from the traditional style instruments against the Neural Net engine.
We take this approach one step further for MVA modelling. To price the MVA we require not only the forward valuation but also forward sensitivities along each Monte Carlo path. This is an order of magnitude increase in computational complexity and data requirements. To solve this problem, we extend the neural networks to predict values and all sensitivities of the product. For interest rate products this includes discounting, LIBOR (or RFR) basis, cross-currency basis and foreign exchange risks. Using this trained net, in a single forward pass we can simultaneously predict the value and all sensitives, by timestep and path at the product level. The trade level sensitivities can be aggregated and used to calculate initial margin through ISDA SIMM and ultimately the MVA funding cost.
Predicting the trade level sensitivities from the NN allows for a massive acceleration of MVA as accurate derivatives are available with limited additional cost. Our analysis has shown that NNs can be trained to replicate various product types (both vanilla and exotic) to a high degree of accuracy (errors in final xVAs are less than the Monte Carlo noise of the simulations), see Aryan 2020 for details on Bermudan Swaption modelling.
IHS Markit's xVA Neural Net Engine
IHS Markit is an industry leading vendor who believes it is the first to offer a turnkey software as a service solution utilizing Neural Nets for XVA pricing*. The Neural Net xVA Engine is available as a preview in our Risk Bureau product. The product allows for a live calculation of xVAs for user-entered portfolios of swaps and cross currency swaps. The interest rate and fx data is sourced daily along with a wide array of credit curves. The product allows users to compute fast xVAs run on a GPU cloud server based on the latest market conditions. To preview the product please click here.
*Updated from earlier version to note this is believed to be the first turnkey SaaS application using Neural Nets for xVA.
- Weekly Global Market Summary Highlights: November 29-December 3, 2021
- Municipal Calendar Week of December 6th 2021
- MSCI Emerging market FY 2021 dividends expected to grow 21.4%
- Daily Global Market Summary - 6 December 2021
- A new strain on markets
- iBoxx ALBI Monthly Update: December 2021
- Daily Global Market Summary - 3 December 2021
- iBoxx SGD Monthly Update: December 2021
Watch a recent interview by Waters Technology with our own JD Singh. They discuss what the buy-side is struggling w… https://t.co/rdmrLxpX47