skip to main content
10.1145/3604237.3626857acmotherconferencesArticle/Chapter ViewAbstractPublication PagesicaifConference Proceedingsconference-collections
research-article

Gradient-Assisted Calibration for Financial Agent-Based Models

Published:25 November 2023Publication History

ABSTRACT

Agent-based modelling (ABMing) is a promising approach to modelling and reasoning about complex systems such as financial markets. However, the application of ABMs in practice is often impeded by the models’ complexity and the ensuing difficulty of performing parameter inference and optimisation tasks. This in turn has motivated efforts directed towards the construction of differentiable ABMs, enabled by recently developed effective auto-differentiation frameworks, as a strategy for addressing these challenges.

In this paper, we discuss and present experiments that demonstrate how differentiable programming may be used to implement and calibrate heterogeneous ABMs in finance. We begin by considering in more detail the difficulties inherent in constructing gradients for discrete ABMs. Secondly, we illustrate solutions to these difficulties, by using a discrete agent-based market simulation model as a case study. Finally, we show through numerical experiments how our differentiable implementation of this discrete ABM enables the use of powerful tools from probabilistic machine learning and conditional generative modelling to perform robust parameter inferences and uncertainty quantification, in a simulation-efficient manner.

References

  1. Philipp Andelfinger. 2021. Differentiable Agent-Based Simulation for Gradient-Guided Simulation-Based Optimization. arXiv:2103.12476 [cs, eess] (March 2021). arxiv:2103.12476 [cs, eess]Google ScholarGoogle Scholar
  2. Gaurav Arya, Moritz Schauer, Frank Schäfer, and Christopher Rackauckas. 2022. Automatic differentiation of programs with discrete randomness. Advances in Neural Information Processing Systems 35 (2022), 10435–10447.Google ScholarGoogle Scholar
  3. Yuanlu Bai, Henry Lam, Tucker Balch, and Svitlana Vyetrenko. 2022. Efficient Calibration of Multi-Agent Simulation Models from Output Series with Bayesian Optimization. In Proceedings of the Third ACM International Conference on AI in Finance. 437–445.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Atilim Gunes Baydin, Barak A Pearlmutter, Alexey Andreyevich Radul, and Jeffrey Mark Siskind. 2018. Automatic differentiation in machine learning: a survey. Journal of Marchine Learning Research 18 (2018), 1–43.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Yoshua Bengio, Nicholas Léonard, and Aaron Courville. 2013. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432 (2013).Google ScholarGoogle Scholar
  6. Jeff Bezanson, Alan Edelman, Stefan Karpinski, and Viral B Shah. 2017. Julia: A Fresh Approach to Numerical Computing. SIAM review 59, 1 (2017), 65–98.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Pier Giovanni Bissiri, Chris Holmes, and Stephen G Walker. 2016. A general framework for updating belief distributions. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 78, 5 (2016), 1103.Google ScholarGoogle ScholarCross RefCross Ref
  8. Badr-Eddine Cherief-Abdellatif and Pierre Alquier. 2020. MMD-Bayes: Robust Bayesian Estimation via Maximum Mean Discrepancy. In Proceedings of The 2nd Symposium on Advances in Approximate Bayesian Inference(Proceedings of Machine Learning Research, Vol. 118), Cheng Zhang, Francisco Ruiz, Thang Bui, Adji Bousso Dieng, and Dawen Liang (Eds.). PMLR, 1–21.Google ScholarGoogle Scholar
  9. Ayush Chopra, Alexander Rodríguez, Jayakumar Subramanian, Arnau Quera-Bofarull, Balaji Krishnamurthy, B. Aditya Prakash, and Ramesh Raskar. 2023. Differentiable Agent-Based Epidemiology. In Proceedings of the 2023 International Conference on Autonomous Agents and Multiagent Systems(AAMAS ’23). International Foundation for Autonomous Agents and Multiagent Systems, Richland, SC, 1848–1857.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Rama Cont. 2007. Volatility clustering in financial markets: empirical facts and agent-based models. Long memory in economics (2007), 289–309.Google ScholarGoogle Scholar
  11. Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. 2017. Density estimation using Real NVP. In International Conference on Learning Representations. https://openreview.net/forum?id=HkpbnH9lxGoogle ScholarGoogle Scholar
  12. Joel Dyer. 2022. Likelihood-free Bayesian inference for dynamic, stochastic simulators in the social sciences. Ph. D. Dissertation. University of Oxford.Google ScholarGoogle Scholar
  13. Joel Dyer, Patrick Cannon, J Doyne Farmer, and Sebastian Schmon. 2022. Black-box Bayesian inference for economic agent-based models. arXiv preprint arXiv:2202.00625 (2022).Google ScholarGoogle Scholar
  14. Joel Dyer, Patrick Cannon, J Doyne Farmer, and Sebastian M Schmon. 2022. Calibrating Agent-based Models to Microdata with Graph Neural Networks. In ICML 2022 Workshop AI for Agent-Based Modelling.Google ScholarGoogle Scholar
  15. Joel Dyer, Patrick Cannon, and Sebastian M Schmon. 2023. Approximate Bayesian Computation with Path Signatures. arxiv:2106.12555 [stat.ME]Google ScholarGoogle Scholar
  16. Reiner Franke. 2009. Applying the method of simulated moments to estimate a small agent-based asset pricing model. Journal of Empirical Finance 16, 5 (2009), 804–815.Google ScholarGoogle ScholarCross RefCross Ref
  17. Christian Gourieroux, Alain Monfort, and Eric Renault. 1993. Indirect inference. Journal of applied econometrics 8, S1 (1993), S85–S118.Google ScholarGoogle ScholarCross RefCross Ref
  18. Jakob Grazzini, Matteo G. Richiardi, and Mike Tsionas. 2017. Bayesian estimation of agent-based models. Journal of Economic Dynamics and Control 77 (2017), 26–47. https://doi.org/10.1016/j.jedc.2017.01.014Google ScholarGoogle ScholarCross RefCross Ref
  19. Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. 2012. A kernel two-sample test. The Journal of Machine Learning Research 13, 1 (2012), 723–773.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Geoffrey Grimmett and David Stirzaker. 2001. Probability and random processes. Oxford university press.Google ScholarGoogle Scholar
  21. Stanislao Gualdi, Marco Tarzia, Francesco Zamponi, and Jean-Philippe Bouchaud. 2015. Tipping points in macroeconomic agent-based models. Journal of Economic Dynamics and Control 50 (2015), 29–61.Google ScholarGoogle ScholarCross RefCross Ref
  22. Eric Jang, Shixiang Gu, and Ben Poole. 2016. Categorical Reparameterization with Gumbel-Softmax. In International Conference on Learning Representations.Google ScholarGoogle Scholar
  23. Diederik P Kingma and Max Welling. 2013. Auto-encoding variational Bayes. arXiv preprint arXiv:1312.6114 (2013).Google ScholarGoogle Scholar
  24. Jeremias Knoblauch, Jack Jewson, and Theodoros Damoulas. 2022. An optimization-centric view on Bayes’ rule: Reviewing and generalizing variational inference. Journal of Machine Learning Research 23, 132 (2022), 1–109.Google ScholarGoogle Scholar
  25. Ignacio N. Lobato and Carlos Velasco. 2000. Long Memory in Stock-Market Trading Volume. Journal of Business & Economic Statistics 18, 4 (2000), 410–427. http://www.jstor.org/stable/1392223Google ScholarGoogle Scholar
  26. Ilya Loshchilov and Frank Hutter. 2017. Decoupled Weight Decay Regularization. In International Conference on Learning Representations.Google ScholarGoogle Scholar
  27. Shakir Mohamed, Mihaela Rosca, Michael Figurnov, and Andriy Mnih. 2020. Monte Carlo Gradient Estimation in Machine Learning. The Journal of Machine Learning Research 21, 1 (2020), 5183–5244.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Corrado Monti, Marco Pangallo, Gianmarco De Francisci Morales, and Francesco Bonchi. 2023. On learning agent-based models from data. Scientific Reports 13, 1 (2023), 9268.Google ScholarGoogle ScholarCross RefCross Ref
  29. Mijung Park, Wittawat Jitkrittum, and Dino Sejdinovic. 2016. K2-ABC: Approximate Bayesian Computation with Kernel Embeddings. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics(Proceedings of Machine Learning Research, Vol. 51), Arthur Gretton and Christian C. Robert (Eds.). PMLR, Cadiz, Spain, 398–407. https://proceedings.mlr.press/v51/park16.htmlGoogle ScholarGoogle Scholar
  30. Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Yang, Zach DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. PyTorch: An Imperative Style, High-Performance Deep Learning Library. Curran Associates Inc., Red Hook, NY, USA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Donovan Platt. 2020. A comparison of economic agent-based model calibration methods. Journal of Economic Dynamics and Control 113 (2020), 103859.Google ScholarGoogle ScholarCross RefCross Ref
  32. Donovan Platt. 2021. Bayesian Estimation of Economic Simulation Models using Neural Networks. Computational Economics (2021), 1–52.Google ScholarGoogle Scholar
  33. Felix Prenzel, Rama Cont, Mihai Cucuringu, and Jonathan Kochems. 2022. Dynamic Calibration of Order Flow Models with Generative Adversarial Networks. In Proceedings of the Third ACM International Conference on AI in Finance (New York, NY, USA) (ICAIF ’22). Association for Computing Machinery, New York, NY, USA, 446–453. https://doi.org/10.1145/3533271.3561777Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Arnau Quera-Bofarull, Ayush Chopra, Anisoara Calinescu, Michael Wooldridge, and Joel Dyer. 2023. Bayesian calibration of differentiable agent-based models. ICLR Workshop on AI for Agent-based Modelling (2023).Google ScholarGoogle Scholar
  35. Arnau Quera-Bofarull, Joel Dyer, Anisoara Calinescu, J. Doyne Farmer, and Michael Wooldridge. 2023. BlackBIRDS: Black-Box Inference foR Differentiable Simulators. Journal of Open Source Software 8, 89 (2023), 5776. https://doi.org/10.21105/joss.05776Google ScholarGoogle ScholarCross RefCross Ref
  36. Arnau Quera-Bofarull, Joel Dyer, Anisoara Calinescu, and Michael Wooldridge. 2023. Some challenges of calibrating differentiable agent-based models. ICML Workshop on Differentiable Almost Everything: Differentiable Relaxations, Algorithms, Operators, and Simulators (2023).Google ScholarGoogle Scholar
  37. Danilo Rezende and Shakir Mohamed. 2015. Variational Inference with Normalizing Flows. In Proceedings of the 32nd International Conference on Machine Learning(Proceedings of Machine Learning Research, Vol. 37), Francis Bach and David Blei (Eds.). PMLR, Lille, France, 1530–1538. https://proceedings.mlr.press/v37/rezende15.htmlGoogle ScholarGoogle Scholar
  38. Victor Storchan, Svitlana Vyetrenko, and Tucker Balch. 2021. Learning who is in the market from time series: market participant discovery through adversarial calibration of multi-agent simulators. arXiv preprint arXiv:2108.00664 (2021).Google ScholarGoogle Scholar
  39. Esteban G Tabak and Cristina V Turner. 2013. A family of nonparametric density estimation algorithms. Communications on Pure and Applied Mathematics 66, 2 (2013), 145–164.Google ScholarGoogle ScholarCross RefCross Ref
  40. Esteban G Tabak and Eric Vanden-Eijnden. 2010. Density estimation by dual ascent of the log-likelihood. Communications in Mathematical Sciences 8, 1 (2010), 217–233.Google ScholarGoogle ScholarCross RefCross Ref
  41. Ronald J Williams. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning 8 (1992), 229–256.Google ScholarGoogle Scholar

Index Terms

  1. Gradient-Assisted Calibration for Financial Agent-Based Models

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in
              • Published in

                cover image ACM Other conferences
                ICAIF '23: Proceedings of the Fourth ACM International Conference on AI in Finance
                November 2023
                697 pages
                ISBN:9798400702402
                DOI:10.1145/3604237

                Copyright © 2023 ACM

                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 25 November 2023

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article
                • Research
                • Refereed limited

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader

              HTML Format

              View this article in HTML Format .

              View HTML Format