This project serves as an ideal solution to the above key question. We evaluate the trading capability of LLM across various financial markets given a unified environment. The LLM shall ingest external information, drive a multi-agent system, and make trading decisions. The LLM performance will be presented in a trading arena view across various dimensions.
๐ Car-racing is for illustration only. LLM performance is subject to the real market.
โผ๏ธ This project is for research purposes only, it DOES NOT TRADE.
- 2025-10: Check out the latest news about DeepFund on QuantML(link) and SyncedTech(ๆบๅจไนๅฟ,link). Besides, our project won the Best Open-source Award (ๆไฝณๅผๆบ้กน็ฎ) in AI Agent 2025 competition (link).
- 2025-09: Our project paper is accepted by NeurIPS 2025 as a poster.
- 2025-08: Our vision paper is accepted by IJCAI 2025 FinLLM Workshop with Oral Paper Award.
- 2025-06: DeepFund & Arena Leaderboard is available for demonstration.
- 2025-05: Our project paper is released on arXiv.
This project aims to be aligned with TRL 1 โ> 9 progression, self-rated as 4 (What is TRL?), from exploratory research to production-ready systems, so we welcome any collaboration. If you are interested, reach out by email or scan the WeChat QR code below.
|
Mr. Changlun Li ๐ฎ cli942[at]connect.hkust-gz.edu.cn ๐ฌ WeChat QR Code |
Prof. Yuyu Luo ๐ฎ yuyuluo[at]hkust-gz.edu.cn |
-
Choose an environment manager:
- If you want to use Anaconda: Install Conda (if not already installed): Go to anaconda.com/download.
- If you want to use uv: Install uv (if not already installed): Go to uv installation guide.
-
Clone the repository:
git clone https://github.com/HKUSTDial/DeepFund.git
cd DeepFund-
Create a virtual env from the env configuration file:
- If you are using Anaconda:
conda env create -f environment.yml # if using Conda - If you are using uv:
uv sync # detects pyproject.toml, create an venv at project root, and install the dependencies source .venv/bin/activate # or .venv\Scripts\activate for windows to activate the venv
- If you are using Anaconda:
-
Set up environment variables:
# Create .env file for your API keys (OpenAI, DeepSeek, etc.)
cp .env.example .envTo better track the system performance, DeepFund uses a database to timely monitor the trading status. Besides, it also stores the LLM reasoning results for future analysis and traceback.
DeepFund connects to Supabase by default.
- Supabase is a PostgreSQL-compatible Cloud Database
- You can create a free account on Supabase website.
- Refer to
src/database/supabase_setup.sqlto create the tables. - Update the
SUPABASE_URLandSUPABASE_KEYin.envfile.
SQLite is a lightweight database that stores data locally.
- Run the following command to create a sqlite database in the path
cd src
python database/sqlite_setup.py- You may need to install VSCode Extension SQLite Viewer to explore the database.
- Path:
src/assets/deepfund.db
DeepFund system gets supported by four elementary tables:
- Config: store user-defined configurations
- Portfolio: record the portfolio updates
- Decision: record the trading decisions from managers
- Signal: record the signals generated from analysts
The ERD is generated by Supabase - DB Schema Visualizer.
Enter the src directory and run the main.py file with configuration:
cd src
python main.py --config xxx.yaml --trading-date YYYY-MM-DD [--local-db]trading-date coordinates the trading date for the system. It can be set to historical trading date till the last trading date. As the portfolio is updated daily, client must use it in chronological order to replay the trading history.
Switch to local DB by adding --local-db option in the command line.
Configs are saved in src/config. Below is a config template:
# Deep Fund Configuration
exp_name: "my_unique_exp_name"
# Trading settings
tickers:
- ticker_a
- ticker_b
# Analysts to run, refer to graph.constants.py
planner_mode: true/false
workflow_analysts:
- analyst_a
- analyst_b
- analyst_c
# LLM model settings, refer to llm/inference.py
llm:
provider: "provider_name"
model: "model_name"We use planner_mode configs to switch the mode:
- True: Planner agent orchestrates which analysts to run from
workflow_analysts. - False: All workflow analysts are running in parallel without orchestration.
exp_nameis unique identifier for each experiment. You shall use another one for different experiments when configs are changed.- Specify
--local-dbflag to use SQLite. Otherwise, DeepFund connects to Supabase by default.
deepfund/
โโโ src/
โ โโโ main.py # Main entry point
โ โโโ agents/ # Agent build and registry
โ โโโ apis/ # APIs for external financial data
โ โโโ config/ # Configuration files
โ โโโ database/ # Database setup and helper
โ โโโ example/ # Expected output
โ โโโ graph/ # Workflow, prompt, and schema
โ โโโ llm/ # LLM providers
โ โโโ util/ # Utility functions and helpers
โโโ environment.yml # For Conda
โโโ README.md # Project documentation
โโโ ...
Technical Guide - Detailed information for developers including:
- Analyst breakdown and system architecture
- System dependencies and API requirements
- Advanced usage: Adding new analysts and LLM providers
The project gets inspiration from the following projects:
- AI Hedge Fund, An AI Hedge Fund Team
- LangGraph, Tutorial on Workflows and Agents
- OpenManus, An open-source framework for building general AI agents
- Supabase, The Open Source Firebase Alternative
- Cursor AI, The AI Code Editor
If you find it useful, please cite it as follows:
- Project Paper
@misc{li2025timetravel,
title={Time Travel is Cheating: Going Live with DeepFund for Real-Time Fund Investment Benchmarking},
author={Changlun Li and Yao Shi and Chen Wang and Qiqi Duan and Runke Ruan and Weijie Huang and Haonan Long and Lijun Huang and Nan Tang and Yuyu Luo},
year={2025},
eprint={2505.11065},
archivePrefix={arXiv},
primaryClass={cs.CE},
url={https://arxiv.org/abs/2505.11065},
}- Vision Paper
@misc{li2025deepfund,
title={DeepFund: Will LLM be Professional at Fund Investment? A Live Arena Perspective},
author={Changlun Li and Yao Shi and Yuyu Luo and Nan Tang},
year={2025},
eprint={2503.18313},
archivePrefix={arXiv},
primaryClass={cs.MA},
url={https://arxiv.org/abs/2503.18313},
}
