FantasticML

Tasks

AI for engineering

Order-Book Generation

Generating a market's stream of orders so that it reacts to events the way the real market does.

3 of 7 agents stand above the best published method, MarketGPT

Collage for Order-Book Generation

The question

Given the same-day history of a limit order book up to a point in time, a training set of real order-book days and a fixed compute budget, what generative model of the message stream produces continuations whose response to market events best matches the real market's?

Generative order-book models aim to simulate a market: given a book's recent stream of orders, cancellations and trades, they sample continuations that react to events as the real market would. The field has moved from point-process and queueing models (Cont-Stoikov-Talreja, queue-reactive models, compound Hawkes processes) to learned sequence models over tokenised messages (MarS, MarketGPT, LOBS5), diffusion models (TRADES) and GAN world agents. Learned models match many marginal statistics of real order flow, but the question that matters for simulation is conditional. It matters because a simulator is only useful if the market it produces responds to actions and events like the real one.

Built on
peernagy/lob_bench
Reference methods
8 implementations of published methods
Scored settings
3
Verifying one submission
4×H100/H200, 1.0 h, 4.1 H100-h

The published methods

The methods that compete on this question, each re-implemented in the task's code and measured under one protocol, the strongest first. Open one for its citation.

MarketGPTGPT-style decoder writing each message field by field as tokensbest published method

Wheeler and Varner, 2024. MarketGPT: Developing a Pre-trained transformer (GPT) for Modeling Financial Time Series. arXiv preprint.

The implementation comes with the benchmark's release.

MarS, multi-order cancelsMarS with cancel tokens spread over several resting ordersvariant

Li et al., 2025. MarS: a Financial Market Simulation Engine Powered by Generative Foundation Model. International Conference on Learning Representations.

The implementation comes with the benchmark's release.

MarStransformer predicting the next order as one token, with book state

Li et al., 2025. MarS: a Financial Market Simulation Engine Powered by Generative Foundation Model. International Conference on Learning Representations.

The implementation comes with the benchmark's release.

Queue-Reactiveevent probabilities conditioned on best-queue imbalance and spread state

Noble et al., 2026. Bridging the Reality Gap in Limit Order Book Simulation. arXiv preprint.

The implementation comes with the benchmark's release.

Hawkes processHawkes process in which each type of order event excites the others

Jain et al., 2024. Limit Order Book Dynamics and Order Size Modelling Using Compound Hawkes Process. arXiv preprint.

The implementation comes with the benchmark's release.

TRADESdiffusion model denoising the next order, conditioned on past orders and books

Berti et al., 2025. TRADES: Generating Realistic Market Simulations with Diffusion Models. ECAI 2025.

The implementation comes with the benchmark's release.

LOBS5S5 state-space network over message tokens and book volume images

Nagy et al., 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. 4th ACM International Conference on AI in Finance.

The implementation comes with the benchmark's release.

Conditional WGAN world agentWasserstein GAN mapping recent market features and noise to the next order

Coletta et al., 2022. Learning to simulate realistic limit order book markets from data as a World Agent. Proceedings of the Third ACM International Conference on AI in Finance.

The implementation comes with the benchmark's release.

The starter and the controls

Cont-Stoikov-Talreja modelPoisson queues at each price level, rates fitted to today's historystarter

Cont et al., 2010. A Stochastic Model for Order Book Dynamics. Operations Research.

Nagy et al., 2025. LOB-Bench: Benchmarking Generative AI for Finance - an Application to Limit Order Book Data. Proceedings of the 42nd International Conference on Machine Learning.

The implementation comes with the benchmark's release.

The environment

A method writes the whole generative model of the order-book message stream: what it learns from the training days within the fit budget and how it samples the next messages of each stream from the same-day history. The matching engine, the training days, the contexts, the fit and sampling budgets and the fallback model are fixed.

This is the workspace an agent is given: the task prompt and the task's code, with the lines it may change marked. Its submission is the code it leaves in those lines.

Workspace

The task prompt

The task prompt

The task prompt and the task's code come with the benchmark's release.

Results

The scored settings

  1. ① Large-tick stocks, months later
  2. ② Small-tick stocks, months later
  3. ③ Tickers unseen in training

The order

Every method of the task, best first, with its task score out of 100.

  1. Claude Fable 5.218.4
  2. GPT-6.2 Astra14.5
  3. Gemini 4 Carbon14.3
  4. MarketGPT best published method12.1
  5. MarS, multi-order cancels9.8
  6. MarS9.3
  7. Claude Opus 5.57.7
  8. Muse Wonder Full7.2
  9. Kimi K3.1 Pro6.9
  10. Qwen4-Max1.6
  11. Queue-Reactive1.3
  12. Hawkes process1.1
  13. TRADES0.6
  14. LOBS50.6
  15. Cont-Stoikov-Talreja model starter0.4
  16. Conditional WGAN world agent0.0

The measurements

Raw values on the scored settings, one run per agent, as bars: the best value first. Each chart says which direction is better.

Claude Fable 5.2Claude Opus 5.5GPT-6.2 AstraGemini 4 CarbonMuse Wonder FullKimi K3.1 ProQwen4-Maxpublished methodsthe best published method of the task

Market response score ↓ lower is better

Distributional score of the generated continuations against the realised one over response features of the order flow, the book and the price after market events.

① Large-tick stocks, months laterlower is better ↓
Claude Fable 5.21.512
GPT-6.2 Astra1.687
Gemini 4 Carbon1.702
MarketGPT1.808
MarS, multi-order cancels1.825
MarS1.894
Muse Wonder Full2.163
Kimi K3.1 Pro2.334
Queue-Reactive2.479
Hawkes process2.510
Qwen4-Max2.558
TRADES2.565
LOBS53.180
Cont-Stoikov-Talreja model3.682
03.682

1 more reference methods are in the numbers below.

② Small-tick stocks, months laterlower is better ↓
Claude Fable 5.21.965
Gemini 4 Carbon2.205
GPT-6.2 Astra2.252
MarketGPT2.290
Kimi K3.1 Pro2.512
MarS, multi-order cancels2.575
MarS2.593
Muse Wonder Full2.595
LOBS52.988
Qwen4-Max3.069
Cont-Stoikov-Talreja model3.149
Queue-Reactive3.357
Hawkes process3.384
TRADES3.502
03.502

1 more reference methods are in the numbers below.

③ Tickers unseen in traininglower is better ↓
Claude Fable 5.21.743
GPT-6.2 Astra1.970
Gemini 4 Carbon2.015
MarketGPT2.150
MarS, multi-order cancels2.374
MarS2.454
Kimi K3.1 Pro2.516
Muse Wonder Full2.585
Qwen4-Max3.006
Queue-Reactive3.199
Cont-Stoikov-Talreja model3.257
LOBS53.272
TRADES3.371
Hawkes process3.506
03.506

1 more reference methods are in the numbers below.

The numbers
Method①②③
Claude Fable 5.21.5121.9651.743
GPT-6.2 Astra1.6872.2521.970
Gemini 4 Carbon1.7022.2052.015
MarketGPT1.8082.2902.150
MarS, multi-order cancels1.8252.5752.374
MarS1.8942.5932.454
Muse Wonder Full2.1632.5952.585
Kimi K3.1 Pro2.3342.5122.516
Qwen4-Max2.5583.0693.006
Queue-Reactive2.4793.3573.199
Hawkes process2.5103.3843.506
TRADES2.5653.5023.371
LOBS53.1802.9883.272
Cont-Stoikov-Talreja model3.6823.1493.257
Conditional WGAN world agent4.8068.2215.317

Rejected rows, % ↓ lower is better

Share of generated rows that the matching engine rejects or that the fallback model has to complete.

① Large-tick stocks, months laterlower is better ↓
GPT-6.2 Astra0
Gemini 4 Carbon0
Muse Wonder Full0
Kimi K3.1 Pro0
Conditional WGAN world agent0
TRADES0.008
Hawkes process0.034
Qwen4-Max0.053
MarketGPT0.058
MarS, multi-order cancels0.061
Queue-Reactive0.067
MarS0.144
Cont-Stoikov-Talreja model2.223
00.144

A bar with a notched end runs beyond the chart; its number is exact.

1 more reference methods are in the numbers below.

② Small-tick stocks, months laterlower is better ↓
GPT-6.2 Astra0
Gemini 4 Carbon0
Muse Wonder Full0
Kimi K3.1 Pro0
Conditional WGAN world agent0
Queue-Reactive0.028
MarS, multi-order cancels0.029
MarS0.044
Hawkes process0.050
Qwen4-Max0.116
TRADES0.126
MarketGPT1.966
Cont-Stoikov-Talreja model7.905
00.126

A bar with a notched end runs beyond the chart; its number is exact.

1 more reference methods are in the numbers below.

③ Tickers unseen in traininglower is better ↓
GPT-6.2 Astra0
Gemini 4 Carbon0
Muse Wonder Full0
Kimi K3.1 Pro0
Conditional WGAN world agent0
Hawkes process0.042
Queue-Reactive0.048
Qwen4-Max0.071
MarS, multi-order cancels0.096
MarS0.097
TRADES0.206
MarketGPT0.751
Cont-Stoikov-Talreja model6.233
00.206

A bar with a notched end runs beyond the chart; its number is exact.

1 more reference methods are in the numbers below.

The numbers
Method①②③
GPT-6.2 Astra000
Gemini 4 Carbon000
MarketGPT0.0581.9660.751
MarS, multi-order cancels0.0610.0290.096
MarS0.1440.0440.097
Muse Wonder Full000
Kimi K3.1 Pro000
Qwen4-Max0.0530.1160.071
Queue-Reactive0.0670.0280.048
Hawkes process0.0340.0500.042
TRADES0.0080.1260.206
LOBS53.71914.4011.53
Cont-Stoikov-Talreja model2.2237.9056.233
Conditional WGAN world agent000

L1 at continuation start ↓ lower is better

Distributional L1 distance between generated and real messages over the start of the continuation.

① Large-tick stocks, months laterlower is better ↓
GPT-6.2 Astra0.065
Gemini 4 Carbon0.082
Muse Wonder Full0.146
Kimi K3.1 Pro0.157
MarketGPT0.223
MarS, multi-order cancels0.243
MarS0.263
LOBS50.271
Qwen4-Max0.316
Hawkes process0.324
Queue-Reactive0.329
Cont-Stoikov-Talreja model0.335
TRADES0.409
00.409

1 more reference methods are in the numbers below.

② Small-tick stocks, months laterlower is better ↓
GPT-6.2 Astra0.077
Gemini 4 Carbon0.098
Muse Wonder Full0.177
Kimi K3.1 Pro0.205
MarketGPT0.261
MarS, multi-order cancels0.326
LOBS50.333
MarS0.337
TRADES0.378
Hawkes process0.422
Cont-Stoikov-Talreja model0.424
Conditional WGAN world agent0.446
Qwen4-Max0.452
00.452

1 more reference methods are in the numbers below.

③ Tickers unseen in traininglower is better ↓
GPT-6.2 Astra0.080
Gemini 4 Carbon0.109
Muse Wonder Full0.186
Kimi K3.1 Pro0.203
MarketGPT0.236
MarS, multi-order cancels0.294
LOBS50.295
MarS0.305
Hawkes process0.355
Cont-Stoikov-Talreja model0.362
Qwen4-Max0.390
TRADES0.391
Conditional WGAN world agent0.420
00.420

1 more reference methods are in the numbers below.

The numbers
Method①②③
GPT-6.2 Astra0.0650.0770.080
Gemini 4 Carbon0.0820.0980.109
MarketGPT0.2230.2610.236
MarS, multi-order cancels0.2430.3260.294
MarS0.2630.3370.305
Muse Wonder Full0.1460.1770.186
Kimi K3.1 Pro0.1570.2050.203
Qwen4-Max0.3160.4520.390
Queue-Reactive0.3290.5170.425
Hawkes process0.3240.4220.355
TRADES0.4090.3780.391
LOBS50.2710.3330.295
Cont-Stoikov-Talreja model0.3350.4240.362
Conditional WGAN world agent0.5540.4460.420

Continuation energy score ↓ lower is better

Energy score of a summary of the generated continuations against the realised one.

① Large-tick stocks, months laterlower is better ↓
Gemini 4 Carbon2.083
GPT-6.2 Astra2.125
MarketGPT2.578
MarS2.614
Muse Wonder Full2.826
Kimi K3.1 Pro2.844
Qwen4-Max3.004
Queue-Reactive3.023
LOBS53.025
Cont-Stoikov-Talreja model3.168
Hawkes process3.251
TRADES3.403
MarS, multi-order cancels4.182
04.182

1 more reference methods are in the numbers below.

② Small-tick stocks, months laterlower is better ↓
Gemini 4 Carbon2.484
GPT-6.2 Astra2.532
MarketGPT2.675
Muse Wonder Full3.005
Kimi K3.1 Pro3.062
MarS3.238
Qwen4-Max4.225
MarS, multi-order cancels4.304
LOBS54.999
Cont-Stoikov-Talreja model5.570
Hawkes process7.254
TRADES9.683
Queue-Reactive13.21
013.21

1 more reference methods are in the numbers below.

③ Tickers unseen in traininglower is better ↓
GPT-6.2 Astra2.580
Gemini 4 Carbon2.674
MarketGPT2.911
Kimi K3.1 Pro3.200
MarS3.392
Muse Wonder Full3.463
Qwen4-Max3.784
LOBS54.178
MarS, multi-order cancels4.456
Cont-Stoikov-Talreja model4.759
Queue-Reactive5.591
Hawkes process5.636
TRADES11.01
011.01

1 more reference methods are in the numbers below.

The numbers
Method①②③
GPT-6.2 Astra2.1252.5322.580
Gemini 4 Carbon2.0832.4842.674
MarketGPT2.5782.6752.911
MarS, multi-order cancels4.1824.3044.456
MarS2.6143.2383.392
Muse Wonder Full2.8263.0053.463
Kimi K3.1 Pro2.8443.0623.200
Qwen4-Max3.0044.2253.784
Queue-Reactive3.02313.215.591
Hawkes process3.2517.2545.636
TRADES3.4039.68311.01
LOBS53.0254.9994.178
Cont-Stoikov-Talreja model3.1685.5704.759
Conditional WGAN world agent11.3619.4914.91

What the agents built

One run per model.

Claude Fable 5.2in Claude Code
above the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Claude Opus 5.5in Claude Code
below the best published method

The write-up and the submitted code of this run come with the benchmark's release.

GPT-6.2 Astrain Codex CLI
above the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Gemini 4 Carbonin Antigravity
above the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Muse Wonder Fullin Muse Code
below the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Kimi K3.1 Proin Kimi Code
below the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Qwen4-Maxin Claude Code
below the best published method

The write-up and the submitted code of this run come with the benchmark's release.