MarS: a Financial Market Simulation Engine Powered by Generative Foundation Model

—

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
Published on 9/4/2024
Equities
Stocks
Cross-asset
AI
LLM
Machine learning
High frequency trading
Risk management
Backtesting
Arbitrage

The paper introduces MarS, a financial market simulation engine powered by the Large Market Model (LMM), a generative foundation model designed for order-level market simulation. LMM combines two complementary approaches: Order Sequence Modeling using a causal transformer to capture individual order sequences, and Order-Batch Sequence Modeling using an auto-regressive transformer with VQ-VAE to model aggregated market behaviors. The model employs a novel tokenization strategy that incorporates order attributes and Limit Order Book (LOB) information, enabling high-resolution simulation of market microstructures.

MarS leverages LMM to generate realistic market trajectories through a conditional generation process that considers four key conditions: scenario descriptions (DES_TEXT), user-injected interactive orders, starting sequences, and market matching rules (MTCH_R). The system includes a simulated clearing house that matches orders in real-time, creating a dynamic feedback loop for continuous simulation. Experiments demonstrate that MarS successfully replicates 14 stylized facts of financial markets and shows strong scalability, with performance improving as model size increases. The paper showcases MarS's applications in four domains: forecasting (outperforming DeepLOB baseline), detection (identifying market manipulation patterns), 'what-if' analysis (evaluating market impact), and reinforcement learning agent training (providing realistic environments for strategy development). This represents a paradigm shift in financial simulation, moving from traditional statistical approaches to generative foundation models that can handle complex, interactive market scenarios.

Highlights

  • 1Introduces Large Market Model (LMM), a generative foundation model for order-level financial market simulation, demonstrating scalability with data and model size
  • 2Develops MarS, a high-fidelity financial market simulation engine powered by LMM, enabling realistic, interactive, and controllable market simulations
  • 3Demonstrates MarS's versatility across four key applications: forecasting, detection, 'what-if' analysis, and reinforcement learning agent training
  • 4Shows that MarS replicates key stylized facts of financial markets and validates market impact models like the Square-Root-Law
  • 5Provides a paradigm shift in financial applications by unifying diverse tasks through conditional trading order generation

Methods

  • M
    Large Market Model (LMM) with ensemble design combining Order Sequence Modeling (causal transformer) and Order-Batch Sequence Modeling (auto-regressive transformer with VQ-VAE)
  • M
    Tokenization of order and order-batch data using structured representations, including order attributes and Limit Order Book (LOB) information
  • M
    Conditional generation process with four key conditions: DES_TEXT descriptions, interactive orders, starting sequences, and matching rules (MTCH_R)
  • M
    Simulated clearing house for real-time order matching and feedback loop for dynamic market simulation

Results

  • R
    MarS successfully replicates 14 stylized facts of financial markets, including aggregational Gaussianity, absence of autocorrelations, and volatility clustering
  • R
    LMM shows strong scalability, with performance improving as model parameters increase from 2 million to 1.02 billion for Order Model and 150 million to 3 billion for Order-Batch Model
  • R
    MarS enables controllable simulations with correlation scores improving from 0.23 to 0.47 when using replay curve control signals
  • R
    In forecasting tasks, MarS outperforms DeepLOB baseline, with larger LMM models (1.02B parameters) showing better accuracy than smaller ones (0.22B parameters)
  • R
    MarS generates synthetic market impact data that adheres to the Square-Root-Law, validating its realism in interactive simulations
0/5

Analyze Paper

Generate insights from "MarS: a Financial Market Simulation Engine Powered by Genera...".

Suggested Actions