Table of Contents
Fetching ...

DiffLOB: Diffusion Models for Counterfactual Generation in Limit Order Books

Zhuohan Wang, Carmine Ventre

TL;DR

DiffLOB addresses the need for counterfactual, regime-aware limit order book generation by conditioning a diffusion-based trajectory model on past LOB states and four future regime variables $c_{t+1:t+\tau}$. It introduces a two-stage, FiLM-modulated Diffusion architecture with a Wavenet-style backbone and a ControlNet-inspired control module to inject regime signals, modeling the conditional distribution $p(x_{t+1:t+\tau}|x_{1:t},c_{t+1:t+\tau})$. Empirically, DiffLOB achieves superior controllable realism, yields regime-consistent counterfactual trajectories under extreme conditions, and improves downstream forecasting when counterfactual samples are used for data augmentation. These results demonstrate the method's practical value for stress testing, scenario analysis, and decision-support in financial markets where explicit future regime manipulation is informative.

Abstract

Modern generative models for limit order books (LOBs) can reproduce realistic market dynamics, but remain fundamentally passive: they either model what typically happens without accounting for hypothetical future market conditions, or they require interaction with another agent to explore alternative outcomes. This limits their usefulness for stress testing, scenario analysis, and decision-making. We propose \textbf{DiffLOB}, a regime-conditioned \textbf{Diff}usion model for controllable and counterfactual generation of \textbf{LOB} trajectories. DiffLOB explicitly conditions the generative process on future market regimes--including trend, volatility, liquidity, and order-flow imbalance, which enables the model to answer counterfactual queries of the form: ``If the future market regime were X instead of Y, how would the limit order book evolve?'' Our systematic evaluation framework for counterfactual LOB generation consists of three criteria: (1) \textit{Controllable Realism}, measuring how well generated trajectories can reproduce marginal distributions, temporal dependence structure and regime variables; (2) \textit{Counterfactual validity}, testing whether interventions on future regimes induce consistent changes in the generated LOB dynamics; (3) \textit{Counterfactual usefulness}, assessing whether synthetic counterfactual trajectories improve downstream prediction of future market regimes.

DiffLOB: Diffusion Models for Counterfactual Generation in Limit Order Books

TL;DR

DiffLOB addresses the need for counterfactual, regime-aware limit order book generation by conditioning a diffusion-based trajectory model on past LOB states and four future regime variables . It introduces a two-stage, FiLM-modulated Diffusion architecture with a Wavenet-style backbone and a ControlNet-inspired control module to inject regime signals, modeling the conditional distribution . Empirically, DiffLOB achieves superior controllable realism, yields regime-consistent counterfactual trajectories under extreme conditions, and improves downstream forecasting when counterfactual samples are used for data augmentation. These results demonstrate the method's practical value for stress testing, scenario analysis, and decision-support in financial markets where explicit future regime manipulation is informative.

Abstract

Modern generative models for limit order books (LOBs) can reproduce realistic market dynamics, but remain fundamentally passive: they either model what typically happens without accounting for hypothetical future market conditions, or they require interaction with another agent to explore alternative outcomes. This limits their usefulness for stress testing, scenario analysis, and decision-making. We propose \textbf{DiffLOB}, a regime-conditioned \textbf{Diff}usion model for controllable and counterfactual generation of \textbf{LOB} trajectories. DiffLOB explicitly conditions the generative process on future market regimes--including trend, volatility, liquidity, and order-flow imbalance, which enables the model to answer counterfactual queries of the form: ``If the future market regime were X instead of Y, how would the limit order book evolve?'' Our systematic evaluation framework for counterfactual LOB generation consists of three criteria: (1) \textit{Controllable Realism}, measuring how well generated trajectories can reproduce marginal distributions, temporal dependence structure and regime variables; (2) \textit{Counterfactual validity}, testing whether interventions on future regimes induce consistent changes in the generated LOB dynamics; (3) \textit{Counterfactual usefulness}, assessing whether synthetic counterfactual trajectories improve downstream prediction of future market regimes.
Paper Structure (25 sections, 11 equations, 8 figures, 4 tables, 2 algorithms)

This paper contains 25 sections, 11 equations, 8 figures, 4 tables, 2 algorithms.

Figures (8)

  • Figure 1: Illustration of DiffLOB Architecture.
  • Figure 2: Realism on Price.
  • Figure 3: Temporal Difference Volume Correlation.
  • Figure 4: Controllable Realism Distribution..
  • Figure 5: Counterfactual Realism Distribution.
  • ...and 3 more figures