TradingAgents-astock: A Practical Guide to the Multi-Agent Research Framework for A-Share Markets

A localized multi-agent investment research framework that brings TradingAgents to the A-share market for free.
TradingAgents-astock is a deeply reworked fork of TradingAgents, redesigned for China's A-share market. It integrates free domestic data sources including East Money and Sina Finance, adds three A-share-specific analyst agents covering policy, industry, and hot money flows, and supports major LLMs like DeepSeek and Tongyi Qianwen. Deploy with one build command and analyze via CLI or a Streamlit WebUI.
Project Background: A Deep Rebuild from US Stocks to A-Shares
In the AI + finance space, Multi-Agent Systems (MAS) are rapidly becoming a focal point of technical innovation. This architecture breaks down complex tasks and distributes them across multiple AI agents, each possessing distinct "specialized capabilities" — typically powered by large language models and configured with specific system prompts to simulate different professional perspectives. Compared to single-model approaches, the core advantage of MAS lies in division of labor and mutual oversight: different agents can correct each other's biases through debate, naturally mirroring the multi-layered decision-making process found in real institutional research — from sector analysts and macro strategists to risk management and compliance.
TradingAgents-astock is a deeply reworked fork of the well-known TradingAgents framework, with the core goal of making multi-agent investment research actually work for the A-share market.
The original TradingAgents is an excellent framework, but it relies on overseas data sources like Yahoo Finance that are neither compatible with A-share trading rules nor capable of covering critical A-share-specific data dimensions. The three most important of these are: Dragon-Tiger Board data (a mandatory disclosure mechanism established by the Shanghai and Shenzhen exchanges, triggered when a stock's daily gain/loss reaches ±7% or turnover is abnormally high, revealing the top five buying and selling brokerage seats by transaction volume), hot money flows (behavior of non-institutional capital active in short-term speculation, closely tied to sector rotation), and lock-up expiry information (the timing of when major shareholders can reduce holdings after the restricted period ends, directly affecting market supply expectations). These three data types are core localization elements for both quantitative and fundamental analysis in A-share markets — and are entirely absent from any overseas framework. This is precisely where TradingAgents-astock delivers its greatest value.

The most fundamental change in this project is the localization of data sources — integrating domestic mainstream data feeds from East Money (东方财富), Sina Finance (新浪财经), Tonghuashun (同花顺), and others, all available for free. Users can conduct fairly comprehensive analysis on A-share securities without any paid subscriptions.
How Seven Agents Collaborate to Make Decisions
The Analyst Team Composition
TradingAgents-astock uses seven analyst agents in a debate-driven decision process, divided into two categories:
- Four original roles: Responsible for candlestick technical indicators, volume-price relationships, social media sentiment, and news & financial report analysis — each evaluating individual stocks from a different dimension.
- Three newly added roles: Specifically designed for A-share characteristics, covering policy interpretation, industry analysis, Dragon-Tiger Board data, and hot money flow tracking.
The seven agents collaborate through a structured workflow: each generates a research report → enters a debate phase → senior-level agents consolidate findings → a final trading plan is produced that incorporates A-share-specific signals such as limit-up patterns and volume-price convergence.
Three-Party Risk Argumentation and Final Verdict
Before a decision is reached, the framework runs a three-party risk argumentation phase: multiple agents debate the trading plan from different risk appetite perspectives using game-theoretic reasoning, after which the LLM delivers a unified final decision.

This "debate first, argue next, decide last" design has solid academic foundations. Multiple AI research papers from 2023 demonstrated that having multiple LLM instances challenge and refute each other effectively reduces hallucination in any single model and improves reasoning accuracy. The approach also draws from the organizational decision-making concept of the Devil's Advocate — deliberately assigning a dissenting role to prevent groupthink and consensus bias. In a financial context, this mechanism aligns closely with behavioral finance: forcing decision-makers to consider opposing viewpoints significantly reduces the errors that stem from overconfidence. At its core, this simulates the checks and balances between analysts, researchers, and risk managers in a real institutional research team — offering substantially greater robustness than a single model generating outputs directly.
Quick and Deep Analysis Modes
The framework offers two operating modes to balance speed and depth:
- Quick Analysis Mode: Ideal for rapidly obtaining conclusions while conserving compute resources and time.
- Deep Analysis Mode: Invokes the full agent pipeline with multiple rounds of debate, suited for scenarios requiring rigorous research.
Installation and Setup: One Build, Ready to Go
The deployment barrier is low — the overall process can be summarized as: clone the repo → build → done. Users who prefer command-line tools like Gemini CLI can also install the corresponding plugins to use alongside it.

Broad LLM Compatibility
TradingAgents-astock is compatible with mainstream large language models both domestically and internationally:
- Domestic models: DeepSeek, Tongyi Qianwen (通义千问), Zhipu (智谱), MiniMax, and more.
- International models: OpenAI, Anthropic, and others.
Users can flexibly specify the exact model version via config files, making it easy to balance cost and performance.
CLI and WebUI Interaction Options
The project offers two usage interfaces:
- CLI: Best suited for scripted or batch-processing workflows.
- WebUI: Built on Streamlit, offering an intuitive interface where users simply enter a stock ticker and analysis period to launch the analysis.

Streamlit is a Python open-source framework that has become extremely popular in data science and AI application development in recent years. It allows developers to transform Python scripts into interactive web applications with minimal code, requiring no frontend development skills. Its "data-centric" design philosophy has made it the WebUI solution of choice for countless open-source AI projects — thousands of LLM tool repositories on GitHub use this framework — dramatically lowering the barrier to accessing AI capabilities. For most users, the WebUI is the more accessible option: after entering a ticker, the seven agents automatically begin analyzing dimensions including candlestick patterns, social media sentiment, news, and financial statements.
A Note on Usage: Free Data Source Reliability
One important caveat: free data sources tend to be less stable. The free interfaces provided by East Money, Sina Finance, Tonghuashun, and similar platforms are essentially web scraping or unofficial APIs intended for regular end-users — fundamentally different from professional financial data terminals like Wind or Bloomberg (which typically cost tens of thousands to hundreds of thousands of yuan per year). The main limitations of free interfaces include: call frequency constraints from anti-scraping mechanisms, data delays that typically range from 15 minutes to a full day, incomplete field coverage, and legal uncertainty around terms of service. During high-frequency calls or network instability, data retrieval failures can occasionally occur. For individual developers and research purposes, free interfaces are a reasonable starting point. For live trading or commercial applications, however, data quality and compliance risks must be carefully evaluated. If an analysis is interrupted or data is missing, retrying or switching data sources is worth trying.
Conclusion: A Practical Starting Point for AI Investment Research
AI applications in financial analysis and quantitative research are proliferating rapidly — reflecting both the maturation of large language model capabilities and the genuine market demand for intelligent research assistants.
TradingAgents-astock successfully migrates an excellent US-stock-oriented framework to the A-share context through localized data source replacement and expanded agent roles, while remaining free, easy to deploy, and broadly compatible with major LLMs. For developers and investors looking to explore multi-agent investment research frameworks, this is a hands-on starting point well worth trying.
Risk Disclaimer: Any AI analysis tool is a reference instrument for decision support only — its outputs do not constitute investment advice. Actual investment decisions must be made carefully, taking into account your own judgment and risk tolerance.
Key Takeaways
Related articles

The Truth Behind Codex 'Build a Website in 5 Minutes': AI Isn't Creating Sites—It's Helping You Copy Them
Exposing the truth behind viral Codex 5-minute website videos: creators aren't building original sites with AI—they're copying shared prompts or scraping others' work. Learn AI coding tools' real limits.

Getting Started with AI Agent Development: A Complete Guide from Concept to Practice
A comprehensive guide to AI Agent architecture and development, covering automated marketing, intelligent customer service, and investment analysis scenarios with single and multi-agent collaboration.

The Truth Behind Codex 'Build a Website in 5 Minutes': AI Isn't Creating Sites — It's Helping You Copy Them
Exposing the truth behind viral Codex 5-minute website videos: creators aren't building original sites with AI — they're copying shared prompts or scraping others' work.