IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2502.07071.html
   My bibliography  Save this paper

TRADES: Generating Realistic Market Simulations with Diffusion Models

Author

Listed:
  • Leonardo Berti
  • Bardh Prenkaj
  • Paola Velardi

Abstract

Financial markets are complex systems characterized by high statistical noise, nonlinearity, and constant evolution. Thus, modeling them is extremely hard. We address the task of generating realistic and responsive Limit Order Book (LOB) market simulations, which are fundamental for calibrating and testing trading strategies, performing market impact experiments, and generating synthetic market data. Previous works lack realism, usefulness, and responsiveness of the generated simulations. To bridge this gap, we propose a novel TRAnsformer-based Denoising Diffusion Probabilistic Engine for LOB Simulations (TRADES). TRADES generates realistic order flows conditioned on the state of the market, leveraging a transformer-based architecture that captures the temporal and spatial characteristics of high-frequency market data. There is a notable absence of quantitative metrics for evaluating generative market simulation models in the literature. To tackle this problem, we adapt the predictive score, a metric measured as an MAE, by training a stock price predictive model on synthetic data and testing it on real data. We compare TRADES with previous works on two stocks, reporting an x3.27 and x3.47 improvement over SoTA according to the predictive score, demonstrating that we generate useful synthetic market data for financial downstream tasks. We assess TRADES's market simulation realism and responsiveness, showing that it effectively learns the conditional data distribution and successfully reacts to an experimental agent, giving sprout to possible calibrations and evaluations of trading strategies and market impact experiments. We developed DeepMarket, the first open-source Python framework for market simulation with deep learning. Our repository includes a synthetic LOB dataset composed of TRADES's generates simulations. We release the code at github.com/LeonardoBerti00/DeepMarket.

Suggested Citation

  • Leonardo Berti & Bardh Prenkaj & Paola Velardi, 2025. "TRADES: Generating Realistic Market Simulations with Diffusion Models," Papers 2502.07071, arXiv.org, revised Feb 2025.
  • Handle: RePEc:arx:papers:2502.07071
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2502.07071
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Andrea Coletta & Joseph Jerome & Rahul Savani & Svitlana Vyetrenko, 2023. "Conditional Generators for Limit Order Book Environments: Explainability, Challenges, and Robustness," Papers 2306.12806, arXiv.org.
    2. Rama Cont & Arseniy Kukanov & Sasha Stoikov, 2014. "The Price Impact of Order Book Events," Journal of Financial Econometrics, Oxford University Press, vol. 12(1), pages 47-88.
    3. Raberto, Marco & Cincotti, Silvano & Focardi, Sergio M. & Marchesi, Michele, 2001. "Agent-based simulation of a financial market," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 299(1), pages 319-327.
    4. Weibing Huang & Charles-Albert Lehalle & Mathieu Rosenbaum, 2015. "Simulating and Analyzing Order Book Data: The Queue-Reactive Model," Journal of the American Statistical Association, Taylor & Francis Journals, vol. 110(509), pages 107-122, March.
    5. Rama Cont & Sasha Stoikov & Rishi Talreja, 2010. "A Stochastic Model for Order Book Dynamics," Operations Research, INFORMS, vol. 58(3), pages 549-563, June.
    6. Justin A. Sirignano, 2019. "Deep learning for limit order books," Quantitative Finance, Taylor & Francis Journals, vol. 19(4), pages 549-570, April.
    7. Rama Cont & Arseniy Kukanov & Sasha Stoikov, 2013. "The Price Impact of Order Book Events," Journal of Financial Econometrics, Oxford University Press, vol. 12(1), pages 47-88, December.
    8. Charles Cao & Oliver Hansch & Xiaoxin Wang, 2009. "The information content of an open limit‐order book," Journal of Futures Markets, John Wiley & Sons, Ltd., vol. 29(1), pages 16-41, January.
    9. Jean-Philippe Bouchaud & Marc Mezard & Marc Potters, 2002. "Statistical properties of stock order books: empirical results and models," Quantitative Finance, Taylor & Francis Journals, vol. 2(4), pages 251-256.
    10. Raberto, Marco & Cincotti, Silvano, 2005. "Modeling and simulation of a double auction artificial financial market," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 355(1), pages 34-45.
    11. Andrea Coletta & Aymeric Moulin & Svitlana Vyetrenko & Tucker Balch, 2022. "Learning to simulate realistic limit order book markets from data as a World Agent," Papers 2210.09897, arXiv.org.
    12. R. Cont, 2001. "Empirical properties of asset returns: stylized facts and statistical issues," Quantitative Finance, Taylor & Francis Journals, vol. 1(2), pages 223-236.
    13. Andrea Coletta & Matteo Prata & Michele Conti & Emanuele Mercanti & Novella Bartolini & Aymeric Moulin & Svitlana Vyetrenko & Tucker Balch, 2021. "Towards Realistic Market Simulations: a Generative Adversarial Networks Approach," Papers 2110.13287, arXiv.org.
    14. Haochong Xia & Shuo Sun & Xinrun Wang & Bo An, 2023. "Market-GAN: Adding Control to Financial Market Data Generation with Semantic Context," Papers 2309.07708, arXiv.org, revised Feb 2024.
    15. Huang, Roger D & Stoll, Hans R, 1994. "Market Microstructure and Stock Return Predictions," The Review of Financial Studies, Society for Financial Studies, vol. 7(1), pages 179-213.
    16. Jean-Philippe Bouchaud & Marc Mezard & Marc Potters, 2002. "Statistical properties of stock order books: empirical results and models," Science & Finance (CFM) working paper archive 0203511, Science & Finance, Capital Fund Management.
    17. Charles Cao & Oliver Hansch & Xiaoxin Wang, 2008. "Order Placement Strategies In A Pure Limit Order Book Market," Journal of Financial Research, Southern Finance Association;Southwestern Finance Association, vol. 31(2), pages 113-140, June.
    18. Hanna Hultin & Henrik Hult & Alexandre Proutiere & Samuel Samama & Ala Tarighati, 2023. "A generative model of a limit order book using recurrent neural networks," Quantitative Finance, Taylor & Francis Journals, vol. 23(6), pages 931-958, June.
    19. Konark Jain & Nick Firoozye & Jonathan Kochems & Philip Treleaven, 2024. "Limit Order Book Simulations: A Review," Papers 2402.17359, arXiv.org, revised Mar 2024.
    20. Robert Almgren, 2003. "Optimal execution with nonlinear impact functions and trading-enhanced risk," Applied Mathematical Finance, Taylor & Francis Journals, vol. 10(1), pages 1-18.
    21. Junyi Li & Xitong Wang & Yaoyang Lin & Arunesh Sinha & Micheal P. Wellman, 2020. "Generating Realistic Stock Market Order Streams," Papers 2006.04212, arXiv.org.
    22. Zijian Shi & John Cartlidge, 2023. "Neural Stochastic Agent-Based Limit Order Book Simulation: A Hybrid Methodology," Papers 2303.00080, arXiv.org.
    23. Peer Nagy & Sascha Frey & Silvia Sapora & Kang Li & Anisoara Calinescu & Stefan Zohren & Jakob Foerster, 2023. "Generative AI for End-to-End Limit Order Book Modelling: A Token-Level Autoregressive Generative Model of Message Flow Using a Deep State Space Network," Papers 2309.00638, arXiv.org.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Zijian Shi & John Cartlidge, 2024. "Neural stochastic agent‐based limit order book simulation with neural point process and diffusion probabilistic model," Intelligent Systems in Accounting, Finance and Management, John Wiley & Sons, Ltd., vol. 31(2), June.
    2. Zijian Shi & John Cartlidge, 2023. "Neural Stochastic Agent-Based Limit Order Book Simulation: A Hybrid Methodology," Papers 2303.00080, arXiv.org.
    3. Martin D. Gould & Mason A. Porter & Stacy Williams & Mark McDonald & Daniel J. Fenn & Sam D. Howison, 2010. "Limit Order Books," Papers 1012.0349, arXiv.org, revised Apr 2013.
    4. Thiago W. Alves & Ionut Florescu & George Calhoun & Dragos Bozdog, 2020. "SHIFT: A Highly Realistic Financial Market Simulation Platform," Papers 2002.11158, arXiv.org, revised Aug 2020.
    5. Matthias Schnaubelt & Jonas Rende & Christopher Krauss, 2019. "Testing Stylized Facts of Bitcoin Limit Order Books," JRFM, MDPI, vol. 12(1), pages 1-30, February.
    6. Hamza Bodor & Laurent Carlier, 2025. "Deep Learning Meets Queue-Reactive: A Framework for Realistic Limit Order Book Simulation," Papers 2501.08822, arXiv.org.
    7. Marvin S. Mueller, 2016. "A stochastic Stefan-type problem under first-order boundary conditions," Papers 1601.03968, arXiv.org, revised Oct 2018.
    8. Martin D. Gould & Mason A. Porter & Stacy Williams & Mark McDonald & Daniel J. Fenn & Sam D. Howison, 2013. "Limit order books," Quantitative Finance, Taylor & Francis Journals, vol. 13(11), pages 1709-1742, November.
    9. Philippe Bergault & Enzo Cogn'eville, 2024. "Simulating and analyzing a sparse order book: an application to intraday electricity markets," Papers 2410.06839, arXiv.org.
    10. Xuefeng Gao & S. J. Deng, 2014. "Hydrodynamic limit of order book dynamics," Papers 1411.7502, arXiv.org, revised Feb 2016.
    11. Rama Cont & Pierre Degond & Xuan Lifan, 2023. "A mathematical framework for modelling order book dynamics," Working Papers hal-03968767, HAL.
    12. Korolev, V.Yu. & Chertok, A.V. & Korchagin, A.Yu. & Zeifman, A.I., 2015. "Modeling high-frequency order flow imbalance by functional limit theorems for two-sided risk processes," Applied Mathematics and Computation, Elsevier, vol. 253(C), pages 224-241.
    13. Saran Ahuja & George Papanicolaou & Weiluo Ren & Tzu-Wei Yang, 2016. "Limit order trading with a mean reverting reference price," Papers 1607.00454, arXiv.org, revised Nov 2016.
    14. Rama Cont & Pierre Degond & Lifan Xuan, 2023. "A mathematical framework for modelling order book dynamics," Papers 2302.01169, arXiv.org.
    15. Ioane Muni Toke & Nakahiro Yoshida, 2020. "Analyzing order flows in limit order books with ratios of Cox-type intensities," Post-Print hal-01799398, HAL.
    16. Konark Jain & Nick Firoozye & Jonathan Kochems & Philip Treleaven, 2024. "Limit Order Book Simulations: A Review," Papers 2402.17359, arXiv.org, revised Mar 2024.
    17. Troy Tassier, 2013. "Handbook of Research on Complexity, by J. Barkley Rosser, Jr. and Edward Elgar," Eastern Economic Journal, Palgrave Macmillan;Eastern Economic Association, vol. 39(1), pages 132-133.
    18. Rama Cont & Pierre Degond & Xuan Lifan, 2025. "A mathematical framework for modelling order book dynamics," Post-Print hal-03968767, HAL.
    19. David Evangelista & Yuri Saporito & Yuri Thamsten, 2022. "Price formation in financial markets: a game-theoretic perspective," Papers 2202.11416, arXiv.org.
    20. Qinghua Li, 2014. "Facilitation and Internalization Optimal Strategy in a Multilateral Trading Context," Papers 1404.7320, arXiv.org, revised Jan 2015.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2502.07071. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.