When we created our Pricer Demo to showcase the speed and accuracy of Riskfuel technology, we chose a complex real-world model to accelerate: the Bermudan Swaption model. The Demo allows you to modify any of this model’s 157 parameters and compare Riskfuel performance against that of Quantlib’s open-source traditional model.
The Demo runs on a single CPU core. Riskfuel models are designed to run on GPUs to take advantage of GPU parallelization, but even when we limit them to a single CPU core, Riskfuel models are still dramatically faster than traditional models.
This paper describes the Bermudan Swaption and its valuation models, and discusses a small case study of 36 random trades which we use to illustrate the accuracy of the Riskfuel model and compare its run-time performance again the target Quantlib model. We used the Demo to generate and value the sample trades, and the prices and run-times were captured for both models.
About the Bermudan Swaption
A swaption is an option on an interest rate (IR) swap, and a Bermudan swaption is one that offers multiple prespecified exercise dates. The Bermudan’s additional exercise dates give the buyer much more flexibility but also makes the Bermudan swaption more expensive than the simpler vanilla swaptions which can only be exercised at maturity. The Bermudan Swaption is a private contract between a buyer and a seller; the two parties agree on the duration and premium of the option, as well as the notional amount, strike price, and frequency of payments of the underlying IR swap. The pricing of the option is affected both by the terms of the contract, and by market conditions including the interest rate curve and the volatility surface parameters.
The Traditional Model
The Bermudan swaption is more difficult to price than the vanilla variety due to the additional exercise dates. While vanilla option values can be calculated analytically using a version of the closed-form Black-Scholes equation, the Bermudan requires the use of numerical methods which take a very long time to compute.
In addition to pricing, traders and risk managers also need to understand how the value of a swaption changes with respect to the underlying swap market. Calculation of the risk sensitivities is typically done through ‘bump and reval’, a process where each input is bumped sequentially and the value of the swaption revalued. Calculating all the risk sensitivities (‘Greeks’) in this manner is often infeasible because of the large numbers involved. Traders usually make do with a small number of Greeks due to the compute constraints.
The Riskfuel Model
While the valuation model of the Bermudan Swaption uses numerical methods which are costly to compute, the Riskfuel model is essentially an analytic function that closely approximates the behaviour of the traditional model. The Riskfuel model is therefore much quicker than the numerical model it mimics.
The Riskfuel model is constructed using machine learning techniques involving deep neural networks (DNNs). It was trained to reproduce the Quantlib Bermudan Swaption model along 157 input dimensions: 140 points on the volatility surface, 14 points on the interest rate curve and the trade-specific parameters of strike price, non-call period, and Swaption term.
The results of this study show that Riskfuel models are very accurate. The absolute difference of option values between the neural network approximation and the traditional Quantlib model has a mean of 0.67 bps with a standard deviation of 0.45 bps.
The average run-time of our 36 sample trades was 0.026 seconds for the Riskfuel model, and 8.39 seconds for the Quantlib model. So it looks like the Riskfuel model is about 300x over the traditional model – however, we haven’t factored in the risk sensitivities yet.
The Risk Sensitivities
During an average of 0.026 seconds, the Riskfuel model calculated the price and all the risk sensitivities. The Quantlib model would need an average of 157 x 8.39 seconds, or approximately 22 minutes to calculate all 157 Greeks; and now you know why the demo does not provide Greeks for the Quantlib model!
When we consider the Greeks, the Riskfuel model in this demo is about 50,000 times faster than the traditional model.
The Effect of Portfolio Size
The Riskfuel Demo values single trades, while typical portfolios can have 5000, 10000, or more trades. Riskfuel models are designed to harness the parallelization that is available to neural network models and excels when working with large portfolios. In our case study with Microsoft Azure, we found that the Riskfuel model achieved higher and higher throughputs for increasing portfolio sizes. The following chart taken from the Azure case study, compares run-times between the target model using a traditional valuation approach versus various Riskfuel versions of the model. Riskfuel performance far surpasses that of the target model, particularly as you start calculating on larger portfolios. When we consider the large number of trades in a typical portfolio, Riskfuel easily outperforms traditional models by 1,000,000x!
Do Your Own Test
The results of this small case study show dramatic run-time speed-ups with no drop in accuracy. But don’t just take our word for it – Play with the Riskfuel Demo and come to your own conclusions!