TRADES: Generating Realistic Market Simulations with Diffusion Models

—

TRADES: Generating Realistic Market Simulations with Diffusion Models

Leonardo Berti
Bardh Prenkaj
Paola Velardi
Published on 1/31/2025
Equities
Stocks
Machine learning
Deep learning
High frequency trading
Alternative data

The paper introduces TRADES (TRAnsformer-based Denoising Diffusion Probabilistic Engine for LOB Simulations), a novel generative model for creating realistic and responsive Limit Order Book (LOB) market simulations. TRADES leverages a conditional diffusion process with a transformer architecture to generate order flows as multivariate time series, conditioned on past orders and LOB snapshots. This approach addresses limitations of prior GAN-based methods, such as mode collapse and training instability, and improves upon traditional agent-based simulations that oversimplify market dynamics. The model is trained in a self-supervised manner by adding noise only to the target future step and learning to denoise it, enabling autoregressive generation at inference time.

Key contributions include the first quantitative metric for market simulation evaluation—the predictive score, which measures the usefulness of synthetic data by training a price predictor on generated data and testing on real data. TRADES significantly outperforms state-of-the-art methods (CGAN and IABS) on Tesla and Intel stocks, achieving 3.27x and 3.48x improvements in predictive score. The generated simulations also exhibit high realism, covering 67% of the real data distribution in PCA space and reproducing important stylized facts such as volatility clustering and absence of return autocorrelation. Furthermore, TRADES demonstrates responsiveness to external agents in market impact experiments, enabling counterfactual analysis of trading strategies.

The authors release DeepMarket, an open-source Python framework for deep learning-based market simulation, along with TRADES-LOB, a synthetic LOB dataset. This work advances the field by providing a robust, quantitative evaluation framework and a practical tool for generating high-fidelity market data, with potential applications in strategy backtesting, market impact studies, and financial research.

Highlights

  • 1Proposes TRADES, a transformer-based denoising diffusion probabilistic model for generating realistic and responsive Limit Order Book (LOB) market simulations.
  • 2Introduces the predictive score as the first quantitative metric for evaluating market simulation usefulness, adapted from time-series generation literature.
  • 3Releases DeepMarket, the first open-source Python framework for deep learning-based LOB market simulation, along with a synthetic LOB dataset (TRADES-LOB).
  • 4Demonstrates significant improvements over state-of-the-art methods (CGAN, IABS) with 3.27x and 3.48x better predictive scores on Tesla and Intel stocks.
  • 5Validates realism through stylized facts (e.g., volatility clustering, return autocorrelation) and responsiveness via market impact experiments with an external agent.

Methods

  • M
    Conditional Denoising Diffusion Probabilistic Model (DDPM) with transformer-based architecture for multivariate time series generation.
  • M
    Self-supervised training with noise applied only to the target future step, conditioning on past orders and LOB snapshots (10 levels).
  • M
    Autoregressive generation using a sliding window approach to produce sequential order flows.
  • M
    Hybrid simulation framework combining the generative model with an agent-based simulation environment (ABIDES) for interactive experiments.

Results

  • R
    TRADES achieves predictive scores of 1.213 (Tesla) and 0.307 (Intel), outperforming CGAN (3.453, 0.699) and IABS (1.870, 1.866).
  • R
    PCA analysis shows TRADES covers 67.04% of the real data distribution, compared to 57.49% (CGAN) and 52.92% (IABS).
  • R
    Generated data reproduces key stylized facts: absence of return autocorrelation, positive volume-volatility correlation, negative return-volatility correlation, and volatility clustering.
  • R
    Market impact experiments demonstrate TRADES's responsiveness: introducing a POV agent causes permanent price changes, unlike the instantaneous impact in market replay.
  • R
    Synthetic data from TRADES is useful for training mid-price prediction models, with performance approaching that of real data.
0/5

Analyze Paper

Generate insights from "TRADES: Generating Realistic Market Simulations with Diffusi...".

Suggested Actions