Model or dataset
simonlin1212/TradingAgents-astock avatar
simonlin1212/TradingAgents-astock

TradingAgents-Astock: An A-Share Multi-Agent Research Fork with Real Market Constraints

A股多Agent投研框架 — 适配A股数据源(龙虎榜/游资/解禁等),7位分析师基于A股规则的辩论决策,基于TradingAgents深度改造,适配大A。A-share multi-agent investment research framework — 7 AI analysts, bull/bear debate, risk assessment。

3,338 stars859 forksPythonApache-2.0

At a glance

What is it?
This fork of TauricResearch/TradingAgents adapts a seven-analyst LLM debate pipeline to China's A-share market, swapping US data sources for free domestic feeds and encoding T+1, price-limit, and lot-size rules. It is a research tool, not a trading service.
Who is it for?
Adopt TradingAgents-Astock if you are a quant researcher or ML engineer who wants a reproducible, Apache-2.0 baseline for multi-agent stock analysis on A-share data without paying for Tushare points or overseas APIs. Do not use it if you need production-grade trade execution, regulatory-grade data provenance, or if you expect the LLM debate to replace human risk judgment.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 11 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

Why a Fork for A-Shares Exists

The upstream TradingAgents project, cited in the README as having 65K stars, was built for US equities. It pulls data from Yahoo Finance and Alpha Vantage, and its analyst roles assume T+0 trading, no daily price limits, and English-language output. That design breaks on China's A-share market, where T+1 settlement, daily price limits (漲跌停), minimum board lots, and ST stock rules change how any investment thesis must be evaluated. TradingAgents-Astock exists to re-target that pipeline. The README states the fork is not a translation but a deep adaptation across three dimensions: data sources, analyst roles, and trading rules. This matters because a model that debates a US stock using US data cannot reason about a Chinese stock where a lockup expiry or a hot-money flow on the 龙虎榜 (Dragon-Tiger List) may dominate the price action. The fork's stated audience is researchers and educators, not retail investors seeking advice. It explicitly disclaims providing any investment service, which is a sensible boundary given the experimental nature of multi-agent LLM systems.

Seven Analysts and the Debate Pipeline

The original TradingAgents uses four analyst roles: market, sentiment, news, and fundamentals. This fork adds three A-share-specific roles: a policy analyst (政策分析师), a hot-money tracker (游资追踪师), and a lockup-expiry monitor (解禁监控师). The README justifies these additions by noting that A-shares are a policy-driven market, that speculative capital (游资) is a core short-term pricing force, and that share unlock events are a major supply shock unique to the market. The architecture diagram shows a clear flow: all seven analysts generate research reports with a tool loop, then a bull versus bear debate runs for up to N rounds, followed by a research manager that synthesizes a plan, a trader that applies A-share constraints, a three-way risk debate among aggressive, conservative, and neutral positions, and finally a portfolio manager that outputs a rating and rationale. The pipeline uses two LLM tiers: a quick_think_llm for analysts, researchers, trader, and risk debaters, and a deep_think_llm for the research and portfolio managers, which need broader context. This division is a practical way to control cost, since the README notes each analysis requires 30-50 LLM calls.

Data Sources and the Anti-Ban Throttle

A notable design choice is the complete avoidance of Tushare, Alpha Vantage, and Yahoo Finance. Instead, the fork uses mootdx over TCP port 7709 for OHLCV and financial snapshots, plus HTTP endpoints from Tencent Finance, East Money (东方财富), Sina Finance, 10jqka (同花顺), CLS (财联社), and Baidu Stock. All are free and require no API key. The README is explicit about rate-limit risks: East Money's risk control blocks IPs at more than 5 requests per second, 10 or more concurrent requests, or 200 requests per minute. To avoid this, all East Money calls go through a built-in throttle entry point `_em_get()` that serializes requests with a default interval of at least 1 second plus random jitter of 0.1 to 0.5 seconds, and reuses a Keep-Alive session. For batch runs, you can set the environment variable `EM_MIN_INTERVAL=1.5~2` to slow down further. Other sources are not throttled, so the system prioritizes mootdx and Tencent for quotes and market data, reserving East Money only for data it uniquely provides, such as 龙虎榜, lockup schedules, fund flows, and sector quotes. This is a pragmatic engineering response to a real operational constraint, and it shows the fork's authors have actually run this system at scale.

Installation and Configuration Paths

Getting started requires Python 3.10 or newer. The README gives a straightforward sequence: clone the repository, run `pip install -e .`, and then either launch the Web UI with `streamlit run web/app.py` or use the `tradingagents` CLI. Docker is optional, not required. The LLM configuration uses a `.env` file in the project root. The README lists several provider options: MiniMax (recommended for domestic direct connection), DeepSeek, Zhipu GLM, Qwen via DashScope, and OpenAI. Each provider has a specific environment variable, such as `MINIMAX_API_KEY`, `DEEPSEEK_API_KEY`, `ZHIPU_API_KEY`, or `DASHSCOPE_API_KEY`. There is also an optional `[agentsdk]` extra that lets you route some or all nodes through the Claude Agent SDK, using a personal Claude Pro or Max subscription instead of metered API billing. That is an unusual feature and could be a cost saver for individual researchers, but it depends on the stability of the agentsdk integration. The README also notes that Google Gemini requires explicit installation of `langchain-google-genai` and `google-genai` packages, since there is no `[google]` extra.

What the Fork Does Not Solve

The most obvious limitation is that the system is a research framework, not a trading system. It outputs ratings and reasoning, but nothing in the described pipeline connects to a broker API or executes orders. The README's disclaimer is not just legal boilerplate; it reflects the fact that the debate's output is probabilistic and depends on the quality of the LLM and the data. Another limitation is the reliance on free, unofficial HTTP endpoints. East Money's anti-ban measures are documented, but other sources like Tencent or Sina could change their endpoints without notice, breaking the data layer. The README does not mention any fallback if a source goes offline. Also, the internal debate is kept in English to preserve reasoning quality, while the final report is in Chinese. That mixed-language design may be fine for Chinese-speaking users, but it adds a translation layer that could introduce subtle errors. The README does not discuss how the system handles data gaps, such as missing financial statements for newly listed companies or incomplete 龙虎榜 data for certain boards. Those gaps are common in A-share data, and the absence of a documented handling strategy is a real gap for production use.

Maintenance, Licensing, and Upstream Tracking

The project is licensed under Apache-2.0, which is permissive and allows commercial use, but you should read the upstream TradingAgents license as well, since this is a fork. The README references a `CHANGES_FROM_UPSTREAM.md` file, which is a good practice for tracking modifications. The release history shows active maintenance: v0.5.17 was pushed on September 5, 2026, with a fix for Web UI remembering LLM configuration, and v0.5.16 addressed a KeyError in config. There is also a v0.5.15 that added per-role API key configuration via `role_llms`. This suggests the project is being iterated on with real user feedback. However, the README also includes a prominent section where the author is seeking a job in Shenzhen, which may indicate that maintenance effort could drop if the author gets hired and shifts focus. The project is not archived, and the last push is recent, so the risk of abandonment is currently low, but you should monitor the commit frequency after any major upstream changes to TradingAgents.

A Real Alternative: Upstream TradingAgents or Tushare-Based Pipelines

The most direct alternative is the upstream TauricResearch/TradingAgents itself, which this fork is based on. The difference is not just data source: upstream is designed for US markets with T+0 and no price limits, and its analysts do not include policy, hot-money, or lockup roles. If you trade US equities, the upstream project is a more natural fit and may have a larger community for support. For A-share data, a different approach is to build your own pipeline using Tushare Pro, which offers more structured and reliable data but requires a points-based system (积分墙) that the README explicitly avoids. Tushare gives you access to official exchange data, which could be more stable than scraping East Money's HTTP endpoints. The trade-off is cost and API key management versus the free, direct-connection model of this fork. Another alternative is to use a single LLM with a well-structured prompt and a data library like AkShare, which is a Python library for Chinese financial data. That approach sacrifices the multi-agent debate but reduces complexity and LLM call count. The choice depends on whether you value the debate's structured risk analysis over simplicity and data reliability.

Editorial conclusion

Adopt TradingAgents-Astock if you are a quant researcher or ML engineer who wants a reproducible, Apache-2.0 baseline for multi-agent stock analysis on A-share data without paying for Tushare points or overseas APIs. Do not use it if you need production-grade trade execution, regulatory-grade data provenance, or if you expect the LLM debate to replace human risk judgment. Before adopting, verify that the free data sources (mootdx TCP, East Money HTTP) are reachable from your network and that your chosen LLM provider supports the 30-50 calls per analysis within your rate limits. Also confirm the project's maintenance pace, since the last release (v0.5.17) came only days before this review, but check the CHANGES_FROM_UPSTREAM.md to see how closely it tracks upstream TradingAgents. This fork is a serious engineering adaptation, not a wrapper, and its value depends on whether you treat the debate output as a research artifact, not a signal to trade.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. simonlin1212/TradingAgents-astock on GitHub
Community notes

Community notes