FreedomIntelligence/TwinMarket

[NeurIPS 2025 & ICLR 2025 Financial AI Best Paper Award] A multi-agent framework that leverages LLMs to simulate socio-economic systems

Python

224

42 commits

updated Mar 7, 2026

See the code

README

TwinMarket: A Scalable Behavioral and Social Simulation for Financial Markets

arXiv Project Page LinkedIn Jiqizhixin README README_zh

πŸ’‘ Update

TwinMarket Overview

πŸ“– Overview

TwinMarket is an innovative stock market simulation system powered by Large Language Models (LLMs). It simulates realistic trading environments through multi-agent collaboration, covering personalized trading strategies, social network interactions, and news/information analysis for an end-to-end market simulation.

🎯 Key Features

  • πŸ€– Intelligent Trading Agents: LLM-driven, personalized decision-making
  • 🌐 Social Network Simulation: Forum-style interactions and user relationship graphs
  • πŸ“Š Multi-dimensional Analytics: Technical indicators, news, and market sentiment
  • 🎲 Behavioral Finance Modeling: Includes disposition effect, lottery preference, and more
  • ⚑ High-performance Concurrency: Scalable simulation for large user populations
  • πŸ“ˆ Real-time Matching Engine: Full order matching and execution

πŸš€ Quick Start

# Configure your API and embedding models
cp config/api_example.yaml config/api.yaml
cp config/embedding_example.yaml config/embedding.yaml

# Run the demo
bash script/run.sh

πŸ“ Development Guide

Extend Trading Strategies

Implement new strategies in trader/trading_agent.py:

def custom_strategy(self, market_data):
    """Custom trading strategy"""
    # Implement your strategy logic here
    pass

Add New Evaluation Metrics

Add metrics in trader/utility.py:

def calculate_custom_metric(trades):
    """Compute custom metric"""
    # Implement metric calculation here
    pass

πŸ“š Awesome Papers Using TwinMarket

We welcome community contributions. If your paper uses TwinMarket, feel free to open a PR and add it here.

TitleCodePaper
Interpreting Emergent Extreme Events in Multi-Agent Systemshttps://github.com/mjl0613ddm/IEEEhttps://arxiv.org/abs/2601.20538

🧾 Citation

@inproceedings{yang2025twinmarket,
  title     = {TwinMarket: A Scalable Behavioral and Social Simulation for Financial Markets},
  author    = {Yuzhe Yang and Yifei Zhang and Minghao Wu and Kaidi Zhang and
               Yunmiao Zhang and Honghai Yu and Yan Hu and Benyou Wang},
  booktitle = {The Thirty-ninth Annual Conference on Neural Information Processing Systems (NeurIPS)},
  series    = {NeurIPS},
  volume    = {39},
  year      = {2025},
  url       = {https://arxiv.org/abs/2502.01506}
}

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.

🌟 Star History

Star History Chart

agent
computational-social-science
fintech
social-simulation

FreedomIntelligence/TwinMarket

[NeurIPS 2025 & ICLR 2025 Financial AI Best Paper Award] A multi-agent framework that leverages LLMs to simulate socio-economic systems

Python

224

42 commits

updated Mar 7, 2026

See the code

README

TwinMarket: A Scalable Behavioral and Social Simulation for Financial Markets

arXiv Project Page LinkedIn Jiqizhixin README README_zh

πŸ’‘ Update

TwinMarket Overview

πŸ“– Overview

TwinMarket is an innovative stock market simulation system powered by Large Language Models (LLMs). It simulates realistic trading environments through multi-agent collaboration, covering personalized trading strategies, social network interactions, and news/information analysis for an end-to-end market simulation.

🎯 Key Features

  • πŸ€– Intelligent Trading Agents: LLM-driven, personalized decision-making
  • 🌐 Social Network Simulation: Forum-style interactions and user relationship graphs
  • πŸ“Š Multi-dimensional Analytics: Technical indicators, news, and market sentiment
  • 🎲 Behavioral Finance Modeling: Includes disposition effect, lottery preference, and more
  • ⚑ High-performance Concurrency: Scalable simulation for large user populations
  • πŸ“ˆ Real-time Matching Engine: Full order matching and execution

πŸš€ Quick Start

# Configure your API and embedding models
cp config/api_example.yaml config/api.yaml
cp config/embedding_example.yaml config/embedding.yaml

# Run the demo
bash script/run.sh

πŸ“ Development Guide

Extend Trading Strategies

Implement new strategies in trader/trading_agent.py:

def custom_strategy(self, market_data):
    """Custom trading strategy"""
    # Implement your strategy logic here
    pass

Add New Evaluation Metrics

Add metrics in trader/utility.py:

def calculate_custom_metric(trades):
    """Compute custom metric"""
    # Implement metric calculation here
    pass

πŸ“š Awesome Papers Using TwinMarket

We welcome community contributions. If your paper uses TwinMarket, feel free to open a PR and add it here.

TitleCodePaper
Interpreting Emergent Extreme Events in Multi-Agent Systemshttps://github.com/mjl0613ddm/IEEEhttps://arxiv.org/abs/2601.20538

🧾 Citation

@inproceedings{yang2025twinmarket,
  title     = {TwinMarket: A Scalable Behavioral and Social Simulation for Financial Markets},
  author    = {Yuzhe Yang and Yifei Zhang and Minghao Wu and Kaidi Zhang and
               Yunmiao Zhang and Honghai Yu and Yan Hu and Benyou Wang},
  booktitle = {The Thirty-ninth Annual Conference on Neural Information Processing Systems (NeurIPS)},
  series    = {NeurIPS},
  volume    = {39},
  year      = {2025},
  url       = {https://arxiv.org/abs/2502.01506}
}

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.

🌟 Star History

Star History Chart

agent
computational-social-science
fintech
social-simulation

Significant stargazers

Jeremy Feng

98 followers Β· starred Nov 2025

Haozhe Wu

367 followers Β· starred Nov 2025