Automatic Differentiation (AutoDiff) is a family of techniques for evaluating the sensitivities (derivatives) of numerical functions with unprecedented accuracy and speed. AutoDiff is based on the principle of “divide and conquer”, where the objective function is decomposed into simpler functions for which sensitivities are easy to calculate, and finally the results are aggregated by means of the chain rule.
We have implemented CVA sensitivity calculations for a portfolio made up of equity and fixed income products by means of Reverse-mode Automatic Differentiation in the open source programming language Python. The source code can be flexibly adjusted to client needs and sensitivity computations by means of Reverse-mode Automatic Differentiation can be implemented on demand for virtually any objective function (for which numerical differentiation is justified), by means of which we offer a client-tailored service based on know-how and experience. Additional information on the technical aspects can be found in our flyer on the right.
The complete package – In parallel to the above, we have developed a model validation framework, which enables the validation of Reverse-mode Automatic Differentiation for any given use case. For the rest of this article, we refer to Reverse-mode Automatic Differentiation simply as Automatic Differentiation or AutoDiff.
AutoDiff offers a wide spectrum of applications, ranging from risk management and hedging to calculating regulatory capital.
AutoDiff has the ability to perform sensitivity computations in minutes, which would otherwise take hours or days using traditional alternatives. Hence, AutoDiff allows for almost instantaneous calculations, which on the other hand leads to more efficient risk management and hedging as well as fast gradient-based optimisation, which altogether can lead to cost savings and business expansion.
In order to apply the SA-CVA framework for calculating CVA regulatory capital under MAR50, banks must demonstrate to the regulator the ability to calculate CVA and CVA sensitivities to market risk factors on at least a monthly basis (and on demand). AutoDiff represents an efficient, natural solution to this challenge.
Just as AutoDiff offers a broad palette of possible applications, the methodology comes with valuable benefits. AutoDiff’s most outstanding benefits are its speed and accuracy. Numerical experiments for calculating CVA sensitivities demonstrate that AutoDiff is faster by factors than the finite differences method which is used as standard.
The speed and accuracy of AutoDiff result in a next-level risk management, which on the other hand opens the gates for cost savings and business expansion. In addition, the speed and accuracy of AutoDiff allow the fulfilment of regulatory requirements to adapt the SA-CVA framework under MAR50 for the calculation of CVA regulatory capital, which is less conservative in terms of capital requirements than the alternative BA-CVA framework and hence leads to regulatory capital savings (under the assumption that the entire costs of implementing SA-CVA are affordable for the institution).
In order to demonstrate the efficiency of Automatic Differentiation, we have conducted a numerical experiment for calculating the CVA sensitivities of portfolios consisting of the same number of equity options and interest rate caps. The CVA sensitivities are calculated with respect to equity spot prices, equity volatilities, interest rate volatilites as well as interest rate yields and CDS spreads of the counterparty across pre-specified tenors. The red dots in the figure on the right represent ratios between the finite difference and AutoDiff CVA sensitivity calculation time. The orange line represents a linear interpolation between the red dots and is present only for visual purposes. Thus, the figure can be interpreted as the number of times Automatic Differentiation is faster than finite differences for a given number of CVA sensitivity calculations.
As is evident from the figure, Automatic Differentiation enables CVA sensitivities to be calculated faster by factors than the standard method finite differences. For example, if the calculation of CVA sensitivities with respect to 700 risk factors would take AutoDiff 1.5 minutes, the corresponding calculation using finite differences would take around 7.5 hours. Moreover, AutoDiff is exact (up to numerical precision), whereas finite differences has to deal with a trade-off between accuracy and numerical stability. For more details on the numerical experiment we refer to our flyer above.
If you are interested in our tool and expertise, please get in touch with our team of Swiss experts!
https://pages.pwc.ch/core-contact-page?form_id=7014L000000Pq6KQAS&lang=en&embed=true
Managing Partner, Leader Assurance & Member of the Management Board, PwC Switzerland
Tel: +41 58 792 2444