GPT meets Wall Street: A transformer that speaks the language of stock markets
A transformer-based model that generates realistic financial market order flow, capturing complex market dynamics without explicitly training for them.
-----
https://arxiv.org/abs/2411.16585
π― Original Problem:
β Traditional financial market simulations struggle to replicate real market behavior and microstructure features like limit order books.
-----
π§ Solution in this Paper:
β The paper introduces MarketGPT, a transformer model trained on NASDAQ market data to generate order messages.
β It uses a 768-dimension embedding with 12 layers and 12 heads, totaling 100M parameters.
β The model processes order messages through tokenization, converting 18 pre-processed elements into 24 tokens.
β It employs attention sinks to handle long sequences beyond context windows.
β The system integrates with a discrete event simulator to validate and execute generated orders.
-----
π‘ Key Insights:
β Pre-training on multiple stocks improves model performance
β Attention sinks enable stable generation beyond initial context
β Temperature scaling above 1.0 helps capture rare market events
β Error correction prevents invalid order generation
-----
π Results:
β Successfully reproduces key market properties like heavy-tailed returns and volatility clustering
β Maintains realistic order flow generation with 93% valid messages
β Accurately models inter-arrival times and order size distributions
β Captures complex market dynamics without explicit training










