This posting discusses generative adversarial network for finance.
Financial instruments like options and futures have been around for more than two centuries. Although they became quite notorious during the 2008 stock market turmoil, they serve a real economic purpose for companies around the world.
[Related article: Using GANs to Generate Images of Race Cars]
To explain financial options in simple terms, the right to buy at a given price in the future is known as a call option. Conversely, the right to sell is known as a put contract. When you exercise the option at the expiration date, you may get a payoff based on the difference between the current price and the one specified in your option contract.
Up until recently, the pricing of those financial instruments was done using the popular “Black-Scholes” formula, for which they’ve been awarded a Nobel prize. That formula assumes that the log-returns of the financial time series follows a Gaussian distribution. Using Monte Carlo simulation, that gives you a simple way to estimate the fair price of an option.
Unfortunately, this assumption is flawed, as it cannot account for rare events. Although some adjustments have been tried to make it more robust, the model is still heavily parametric and prone to errors when the market acts irrationally.
Now, research in Artificial Intelligence (AI) is opening the doors to new ways to model complex distributions. In 2014, Ian Goodfellow et al. presented a very interesting two-step Deep Learning architecture called Generative Adversarial Network (GAN). This network is actually made of two subnetworks:
- A generator network which takes as input random noise and then creates a generated output which is fed to.
- A discriminator network whose role is to distinguish “fake” generated output from real examples.
Through backpropagation training, the generator can improve its output thanks to the discriminator feedback, up to a point when making the difference between real and generated examples is very difficult for the discriminator. This research was originally intended to generate photorealistic images, with such impressive results that a GAN-made piece of art was auctioned at Christie’s!
However, GANs are not specific to images and can be applied to generate any type of output. Hence, we have tried to train a GAN on financial time series. The goal was to generate a log-returns distribution that is closer to the real one than the Gaussian curve of the Black-Scholes formula.
[Related article: 6 Unique GANs Use Cases]
Even with a very simple architecture (dense layers with ReLu activations and a pinch of Dropout), we have managed to significantly reduce the error between real and generated distributions, measured by RMSE. We then added our trained GAN as the generative function of our Monte Carlo simulations. That allows us to have a better price estimation than the simulations made under the Black-Scholes formula. The margin for improvement is important as more advanced network architectures can be applied, especially LSTM, to capture the recurrent nature of the stock market.
Editor’s note: Be sure to check out their talk, “Generative Adversarial Networks for Finance,” at ODSC Europe 2019 this November!
More on the writers/speakers:
Alex began his career as a trader in the city of London and shifted to become a data scientist after four years. Alexandre has worked on a wide range of use cases, from creating models that predict fraud to building specific recommendation systems – but he really enjoys working on sports data. He has been leading the data science team for Northern Europe this past two years and is now relocated to Singapore to help ink Dataiku’s presence in the region.
Alex Combessie is a Data Science Lead at Dataiku, involved in the making of data products from prototype to production. Prior to his time at Dataiku, he helped build the Data Science team of Capgemini Consulting in France. Having begun his career in economic analysis, he continues to work on interpretable models in complement to Deep Learning. Alex is also a travel junkie, who enjoys learning new things and making useful products.