← Latest papers
💰 quantitative finance

M3: A State-Event Generative Foundation Model for Market Microstructure Dynamics

The paper introduces M3, a state-event generative foundation model trained on large-scale order-level data that captures the dynamic interaction between order flow and limit-order-book liquidity to enable realistic counterfactual market microstructure simulations for applications like forecasting and stress testing.

Original authors: Yanzhi Zhang, Yu Ma, Yilin Cheng, Jian Li, Yitong Duan

Published 2026-08-21
📖 5 min read🧠 Deep dive

Original authors: Yanzhi Zhang, Yu Ma, Yilin Cheng, Jian Li, Yitong Duan

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Financial markets are vast, complex ecosystems where millions of decisions happen every second, driven by people and algorithms buying and selling assets. At the heart of this system lies a digital ledger known as the limit order book, a constantly shifting record of who wants to buy, who wants to sell, and at what price. This ledger is not just a static list; it is a living environment that changes the moment a new order arrives, and in turn, that changing environment influences the next order that comes in. Because we can only observe the single path history actually took, we cannot see the countless other futures that might have unfolded if a trader had acted differently or if a large order had arrived a second earlier. This limitation makes it difficult to answer critical questions about how markets would react to stress, how a large trade might move prices, or how a strategy would perform under different conditions. To understand these possibilities, researchers need a way to simulate realistic market futures, not just predict the next price tick.

A team of researchers has developed a new tool called M3, a foundation model designed to simulate the intricate dance of liquidity and order flow in electronic markets. Unlike previous attempts that treated the list of orders and the state of the market as separate problems, this model learns to generate entire sequences of future trading events while constantly accounting for how the market's current state shapes those events. The researchers trained M3 on a massive dataset containing roughly 31.9 billion individual order events from the Chinese stock market, covering hundreds of different stocks over nearly two years. By feeding this model a snapshot of the market at a specific moment, it can generate thousands of possible future paths, showing how prices, spreads, and available liquidity might evolve. The model does not just guess the next price; it simulates the actual process of orders arriving, being matched, and updating the market, creating a realistic replay of how the financial world might behave.

The core innovation of M3 is its ability to handle two very different types of information simultaneously: the irregular, chaotic stream of individual orders and the structured, multi-level view of the market's liquidity. In the past, models often struggled to connect these two worlds, treating them as isolated sequences. M3 bridges this gap by translating both the chaotic order events and the structured market snapshot into a unified language of tokens, allowing a powerful neural network to learn the deep, dynamic relationship between them. When the model generates a new order, it does so while considering the current depth of the market, and when it updates the market state, it does so based on the rules of the exchange. This creates a closed loop where the model learns how the market state influences order flow, and how order flow, in turn, reshapes the market. The researchers found that as they increased the size of the model and the amount of data it was trained on, its ability to learn improved in a predictable and consistent way, suggesting that this approach can be scaled up to handle even more complex financial systems.

To verify that the model was truly capturing the essence of the market, the researchers tested it against several well-known patterns that real markets exhibit. They found that the simulated market paths reproduced key statistical features of real trading, such as the tendency for price changes to have extreme outliers and the way volatility tends to cluster together in time. The model also demonstrated a strong ability to predict short-term price movements and future volatility, outperforming older methods that did not account for the full state of the market. Perhaps most importantly, the model proved useful for "what-if" scenarios. When the researchers simulated the effect of a large, one-sided buying or selling pressure, the model responded in a way that matched economic theory, showing prices moving in the expected direction but with a diminishing impact as the size of the order increased. This behavior, known as the square-root law of market impact, is a fundamental characteristic of real markets, and the fact that the model reproduced it without being explicitly programmed to do so suggests it has learned the underlying mechanics of liquidity.

The implications of this work extend beyond simple prediction. By providing a realistic engine for simulating market microstructure, M3 offers a new way to stress-test trading strategies and evaluate the potential risks of large trades before they are executed. The researchers showed that the model could be used to analyze how a trading strategy would perform under different market conditions or to estimate the cost of executing a large order without actually moving the market. This capability is crucial for financial institutions that need to manage risk and optimize their trading activities in an environment where every action has a reaction. While the model is currently trained on data from a specific set of stocks, the researchers believe the approach is scalable and could be adapted to other markets and asset classes. The success of M3 suggests that treating the market as a generative world model, capable of producing multiple realistic futures, is a powerful new direction for understanding and navigating the complexities of modern finance.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →