Modeling limit order book (LOB) dynamics is central to market forecasting and execution-strategy evaluation. While diffusion models achieve strong empirical performance, existing LOB snapshot models typically lack a learned recurrent encoder and formal statistical guarantees. We introduce LOBGrad, a conditional DDPM framework for probabilistic LOB forecasting that combines an autoregressive RNN encoder with a diffusion-based generator. In particular, we establish an excess-risk oracle inequality for the one-step DDPM noise-prediction objective under exponential mixing and regularity assumptions. We further show that, under contractive dynamics, the dependence on the conditioning-window length can be reduced to a dependence on the latent-state dimension. Experiments on BTC/USDT, GOOGL, and META show that LOBGrad improves on its encoder-free diffusion ablation across all reported queue metrics and obtains competitive results against other baselines. It also reproduces the key stylized facts of LOB microstructure, and yields reasonably calibrated queue-based predictive intervals. A stylized downstream task illustrates the potential value of the generated forecasts.
Figures & tables
Figure 1. Illustration of the raw Level-2 LOB, the centered representation used in our model, and the forecasting target. Bid and ask volumes are arranged around a price center, with negative values for bids and positive values for asks. The model uses past snapshots to predict the next price return and signed-log queue volumes.
Metric
LOBGrad
LG-NE
LG-Q
LG-R
CGAN
PTM
TransLOB
DeepLOB
Hawkes
Poisson
BTC/USDT
Queue
L1 volume Wasserstein
0.100
0.104
0.135
—
0.197
0.126
0.201
0.176
0.266
0.330
OB imbalance Wasserstein
0.095
0.107
0.096
—
0.196
0.107
0.203
0.172
0.219
0.280
Queue profile MAE
0.037
0.109
0.049
—
0.044
0.140
0.068
0.082
0.098
0.100
Queue ACF MAE
0.026
0.081
0.024
—
0.034
0.039
0.075
0.072
0.225
0.219
Table 1. Distributional metrics over a 20 -step forecast horizon across 500 held-out windows. Lower values are better. Bold marks the best value per row. ne = no encoder; q = queue only; r = return only. Dashes indicate metrics that are not applicable.
Figure 2. Sample best-bid queue (top) and mid-price (bottom) trajectories from LOBGrad with 50% and 90% predictive intervals on a held-out test window. A dashed vertical line marks the forecast origin. The subsequent realized paths are compared with the forecast medians and shaded predictive intervals.
Figure 3. Marginal distributions of generated and real queue sizes at the top two book levels: bid (left) and ask (right), level 1 (top row) and level 2 (bottom row). Four density plots compare LOBGrad and baseline models with held-out data. LOBGrad closely follows the main peaks and overall shapes of the empirical densities.
Target
50% coverage
90% coverage
Mean 90% width
Returns
0.630
0.844
8.684
Queues ( 2d=10 )
0.442
0.876
6.213
Best-level volume
0.483
0.892
11.034
OB imbalance
0.479
0.900
1.243
Table 2. Calibration summary on BTC/USDT test windows using M=500 rollouts per window and a 20 -step forecast horizon. We report empirical coverages for nominal 50% and 90% central intervals, and the mean width of the 90% interval.
Figure 4. Stylized facts of 5-second BTC/USDT returns: real held-out data (black) versus LOBGrad samples (blue). Return distribution (left), the ACF of returns (middle), and the ACF of absolute returns (right). Both return distributions peak sharply at zero. Return autocorrelation is positive at the first lag and negative at later displayed lags. Absolute-return autocorrelation is negative across the displayed lags.
Strategy
Mean IS
CVaR95(IS)
j=−1 (Market)
5.89
8.45
j=0
1.75
38.90
j=1
0.75
43.42
j=2
0.56
47.86
j=3
2.93
51.51
CGAN-optimized
0.19
47.35
Table 3. Limit-order execution benchmark across 500 test windows, averaged over 5 seeds. IS per share in USDT (lower is better). Bold marks the best non-oracle value in each column.