arXiv:2608.23706cs.AIAug 2026

Manuscript Offprint

arXiv:2608.23706

Do LLMs Understand Limit Order Book Dynamics?

Junxiao Chen, Paul Glasserman

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

A large language model (LLM) trained on synthetic limit order book (LOB) data achieves near perfect scores in generating valid sequences of LOB events. However, the LLM's implicit world model fails to learn the state of the LOB. This deficiency leads to biased estimates and spurious predictability in using the LLM to forecast future LOB events. Our analysis uses novel tests of an LLM's world model, extending prior work from deterministic settings to the stochastic dynamics needed for the LOB.

1. Introduction

If a large language model (LLM) learns to recognize and generate valid sequences of limit order book (LOB) events — order arrivals, execution, and cancellations — has it developed a correct world model of the LOB? Does such an understanding matter? These are the questions we investigate.

We train a transformer-based LLM from scratch using events in a simulated LOB. The LLM performs extremely well in generating valid sequences and in finding sequences that move the LOB from a starting state to a target state. By these measures, the LLM appears to understand key concepts underlying an LOB: transactions can only occur at the best bid or ask price; market orders can only execute against opposite side resting orders; a cancellation order requires the presence of a limit order to be canceled.

At the same time, we find evidence of systematic errors in the LLM's implicit world model of the LOB. A correct understanding of the LOB's dynamics becomes important in applying the trained LLM to a task related to but different from the task on which it was trained.

In our setting, the related task is forecasting. We have in mind a trader or market-maker using the trained LLM to predict, e.g., whether the next order will be a buy or a sell order. We find consistent evidence of spurious predictability: the LLM finds predictability where none exists, and thus delivers misleading forecasts. This is where the abstract concept of an incorrect world model takes on practical consequences.

By using simulated data, we are able to ensure that the state of the data-generating LOB is a Markov chain. Given the current state, the past history of the LOB is therefore irrelevant to its future evolution, yet the LLM's forecasts are influenced by past events. Our framework thus evaluates the LLM under the null hypothesis of no predictability. Events in an actual LOB may well exhibit some predictability, but an LLM's ability to provide reliable forecasts is suspect if it finds predictability under the null. More fundamentally, its implicit world model of an LOB appears to be flawed.

Prior work on inferring and evaluating LLMs' world models includes (Hazineh et al., 2023; Li et al., 2023; Toshniwal et al., 2022) in the setting of games, (Guan et al., 2023) in task planning, (Liu et al., 2023; Vafa et al., 2024) in deterministic finite automata (DFA), and (Vafa et al., 2025) in the setting of physical laws. In these cases, the "true" model is deterministic whereas the evolution of an LOB is inherently stochastic. We adapt and apply some tests studied in the general framework of (Vafa et al., 2024).

Our focus on biased forecasts and spurious predictability is new and particularly relevant to the financial setting. We introduce new tests for this property. Our kernel-level total variation (TV) measures deviations between an LLM's next-token probabilities and the true distribution kernel. Our history-level total variation (TV) measures the erroneous influence of past events on an LLM's forecast distribution. We also apply a regression test to evaluate spurious predictability or miscalibration in the probabilities of future events using information on past events.

From a practical perspective, our results indicate that valid-sequence tests are insufficient in training an LLM for downstream tasks (such as forecasting events) in LOB. Larger training datasets or new training methods are needed to improve an LLM's world model of an LOB. Our results use small LOB settings to make training from scratch feasible; the issues we document would likely be more severe with a larger state space. A growing literature focuses on generating large synthetic financial datasets; see, e.g., (Assefa et al., 2020; Kong et al., 2024; Nagy et al., 2023).

Section 2 reviews LOBs and formulates our LOB dynamics. Section 3 constructs the datasets. Section 4 describes our model training process. Section 5 introduces a simple baseline for comparison. Section 6 uses existing diagnostics to evaluate our models. Section 7 introduces and applies our new tests. Section 8 tests larger LOB settings. Section 9 concludes.