workflowstacks
ai-agent

TradingAgents-CN

基于多智能体LLM的中文金融交易框架 - TradingAgents中文增强版
31,143 stars6,555 forksPythonUpdated 7/24/2026100% free · open source
What it does

TradingAgents-CN is a Chinese financial trading framework based on multi-agent LLM, allowing users to build and deploy AI-powered trading agents for financial markets.

Install / run
pip install -r requirements.txt
When to use it
  • When you need to automate trading decisions in Chinese financial markets
  • When you want to leverage LLM models for financial forecasting and trading
  • When you require a customizable framework for backtesting and evaluating trading strategies
Quick start
  1. 1Clone the repository using `git clone https://github.com/hsliuping/TradingAgents-CN.git`
  2. 2Create a new trading agent by modifying the `agents` directory and adding your own trading logic
  3. 3Configure the `config.yml` file to specify your trading environment and parameters
  4. 4Run the framework using `python main.py` to start the trading simulation
  5. 5Monitor and analyze the trading performance using the built-in visualization tools
Ready-to-paste prompt
python main.py --agent MyAgent --market SZSE --start-date 2022-01-01 --end-date 2022-12-31
Heads up: Make sure you have the necessary dependencies installed, including `tensorflow` and `pandas`, and that your Python version is compatible with the framework (Python 3.8+ recommended)
Saves to your device
How TradingAgents-CN works
Codeflow
Free to inspect

TradingAgents-CN is a very large Python project (~238k lines across 940 code files, plus 316 test files). Setup is light: installs like a normal app — add your API keys. Reading the code is optional. Last commit a month ago, Other license, has a test suite.

Size
Very large codebase
~238k lines · 940 code files · days to read — use, don't read
Setup
One-command install
Installs like a normal app — add your API keys. Reading the code is optional.
Runs on
Python · Docker
Needs API keys (.env)
Python 82%Vue 10%PowerShell 4%TypeScript 2%Shell 1%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    main.py
    Where the program starts running
  3. 3
    pyproject.toml
    Dependencies and the commands it exposes
  4. 4
    .env.example
    The API keys and settings you must provide
  5. 5
    app/__init__.py
    Inside app/ — the main logic begins here
What's in each folder
app/Core code — the actual logic156 files
frontend/Frontend / UI126 files
web/Frontend / UI40 files
cli/Command-line entry points8 files
docs/Documentation580 files
examples/Examples you can copy31 files
scripts/Helper scripts520 files
tradingagents/Folder114 files
READMEHas testsDocumentedCI checksDocker readyExamples includedOther licenseUpdated 1 mo ago
Quick Actions
Details
Creator
hsliuping
Language
Python
Category
ai-agent
Published
6/26/2025

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.