MarS: a Financial Market Simulation Engine Powered by Generative Foundation Model
Junjie Li, Yang Liu, Weiqing Liu, Shikai Fang, Lewen Wang, Chang Xu, Jiang Bian
TL;DR
MarS introduces the Large Market Model (LMM), a domain-specific generative foundation model trained on order-level market data to enable high-resolution, interactive, and controllable financial market simulations. By coupling an Order Sequence Model and an Order-Batch Model within an ensemble, MarS can generate realistic order streams conditioned on history, user inputs, and market rules, then simulate market clearing in real time. The system is validated through realism (stylized facts), interactivity (user-driven market impact), and controllability (prompt- and replay-based control), and is demonstrated across forecasting, detection, 'what-if' analysis, and RL training tasks. The work reports scaling laws for LMM, establishes the effectiveness of a simulated clearing house, and presents novel analyses of market impact beyond the square-root law, highlighting MarS’s potential to transform financial analysis and strategy development in a risk-free, data-rich environment.
Abstract
Generative models aim to simulate realistic effects of various actions across different contexts, from text generation to visual effects. Despite significant efforts to build real-world simulators, the application of generative models to virtual worlds, like financial markets, remains under-explored. In financial markets, generative models can simulate complex market effects of participants with various behaviors, enabling interaction under different market conditions, and training strategies without financial risk. This simulation relies on the finest structured data in financial market like orders thus building the finest realistic simulation. We propose Large Market Model (LMM), an order-level generative foundation model, for financial market simulation, akin to language modeling in the digital world. Our financial Market Simulation engine (MarS), powered by LMM, addresses the domain-specific need for realistic, interactive and controllable order generation. Key observations include LMM's strong scalability across data size and model complexity, and MarS's robust and practicable realism in controlled generation with market impact. We showcase MarS as a forecast tool, detection system, analysis platform, and agent training environment, thus demonstrating MarS's "paradigm shift" potential for a variety of financial applications. We release the code of MarS at https://github.com/microsoft/MarS/.
