← all repositories
microsoft/MarS

Simulating markets with LLaMA, one synthetic order at a time

MarS uses a generative foundation model to produce synthetic order-level financial data, validating its output against eleven canonical market stylized facts.

1.8k stars Python Domain AppsAgents
MarS
Not currently ranked — collecting fresh signals.
star history

What it does

MarS is Microsoft’s market simulation engine that generates synthetic financial data at the order level using an LLaMA-based generative model. It packages the model behind a Ray-served inference endpoint and couples it with agents that maintain and update market states. The release includes tools to audit simulations against classical econometric benchmarks, including a report that checks for heavy tails, volatility clustering, and other empirical patterns.

The interesting bit

Rather than modeling price paths with traditional stochastic calculus, MarS tokenizes market microstructure and generates it autoregressively. The project openly benchmarks its realism against Cont’s eleven stylized facts and hits nine of them, noting that the two misses—gain/loss asymmetry and the leverage effect—are also absent in modern Dow 30 markets.

Key highlights

  • Built on LLaMA with a Ray Serve inference layer; the authors suggest migrating to vLLM or efficient architectures like Mamba, RWKV, or MoE for production
  • Ships with evaluation scripts for stylized facts, market impact, and forecasting, plus a Streamlit demo
  • Research-grade simulations required 128 GPUs running 128 parallel trajectories per state
  • Reproduces 9 of 11 stylized facts from Cont (2001) in both historical and simulated data
  • Core framework is open, but the trained model weights are currently private on Hugging Face pending final review

Caveats

  • The demos and examples are partially crippled until the model weights go public; prerequisites are temporarily available via OneDrive, but the model is not
  • Production deployment is explicitly described as requiring “significant optimizations” beyond the current Ray-based research pipeline
  • Docker is effectively mandatory; direct installation without it is unsupported, and the platform is Linux-only

Verdict

Market-structure researchers and quant developers who need realistic synthetic order flow should bookmark this, but only if they are comfortable running Dockerized Linux environments and waiting for the model weights. Casual explorers will find mostly a promising framework and some statistical validation scripts.

Frequently asked

What is microsoft/MarS?
MarS uses a generative foundation model to produce synthetic order-level financial data, validating its output against eleven canonical market stylized facts.
Is MarS open source?
Yes — microsoft/MarS is open source, released under the MIT license.
What language is MarS written in?
microsoft/MarS is primarily written in Python.
How popular is MarS?
microsoft/MarS has 1.8k stars on GitHub.
Where can I find MarS?
microsoft/MarS is on GitHub at https://github.com/microsoft/MarS.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.