TradingAgents-Astock is a multi-agent investment research framework adapted for China’s A-share market, where several AI analysts examine market, news, sentiment, policy, fundaments, trading activity, and other factors before debating and assessing risk. It is intended for investment research, study, and teaching rather than providing investment advice or services. The catalogue instruction relates to using this A-share-focused research workflow.
Borrowing it
Nothing to install: this file belongs to simonlin1212/TradingAgents-astock. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/simonlin1212/TradingAgents-astock/main/CLAUDE.mdgit clone --depth 1 https://github.com/simonlin1212/TradingAgents-astockWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/simonlin1212/tradingagents-astock/claude-md)<a href="https://agentmods.dev/instructions/simonlin1212/tradingagents-astock/claude-md"><img src="https://agentmods.dev/badge/instructions/simonlin1212/tradingagents-astock/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/simonlin1212/tradingagents-astock/claude-md"><img src="https://agentmods.dev/badge/instructions/simonlin1212/tradingagents-astock/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04011 | $0.04011 |
| Opus 5.5 | $0.01604 | $0.01604 |
| Sonnet 5.5 | $0.00802 | $0.00802 |
| Haiku 4.5 | $0.00401 | $0.00401 |
Grade A, and why
TradingAgents-astock CLAUDE.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
`a_stock.py` 里所有指向 `eastmoney.com` 的请求(push2 / push2his / datacenter-web / search-api / np-weblist 共 7 个调用点)统一走节流入口 `_em_get()`:模块级时间戳串行限流(默认间隔 `EM_MIN_INTERVAL=1.0s`,可用同名环境变量覆盖)+ 0.1~0.5s 随机抖动 + 复用 `requests.Session`(Ke How it starts
The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TradingAgents-Astock
项目概述
基于 TauricResearch/TradingAgents(65K Stars)的 A 股深度特化 fork。多 Agent 投研框架,7 个 Analyst 角色通过 Bull/Bear 辩论 + 三方风险辩论生成投资报告。
- 仓库: https://github.com/simonlin1212/TradingAgents-astock
- 协议: Apache 2.0
- Python: >=3.10
- 当前版本: 0.5.22(2026-10-31)
⚠️ 改版本号时三处要一起改:
pyproject.toml/CHANGELOG.md/ 这一行。漏了这行会让后续 agent 和发版流程读到旧版本(tests/test_version_consistency.py会拦)。
架构
数据层(v0.2.5 全部直连 HTTP,零第三方数据库依赖)
| 来源 | 协议 | 数据 |
|---|---|---|
| mootdx | TCP 7709 | OHLCV K线、财务快照、F10 文本 |
| 腾讯财经 | HTTP (qt.gtimg.cn) | PE/PB/市值/换手率 |
| 东方财富 datacenter | HTTP (datacenter-web) | 龙虎榜、限售解禁、板块行情 |
| 东方财富 push2/push2his | HTTP (push2.eastmoney) | 实时行情、个股信息、板块列表、资金流(分钟+日级) |
| 东方财富 np-weblist | HTTP | 滚动新闻 |
| 新浪财经 | HTTP (money.finance.sina) | K线历史、财报三表 |
| 同花顺 10jqka | HTTP | EPS 一致预期、热股题材 |
| 财联社 cls.cn | HTTP | 全球财经快讯 |
| 百度股市通 | HTTP (gushitong.baidu) | 概念板块归属(资金流已迁移至东财push2) |
Agent 角色(7 个)
原版 4 个(市场/情绪/新闻/基本面)+ A 股特化 3 个(政策分析师/游资追踪/解禁监控)
关键路径
tradingagents/dataflows/a_stock.py— A 股数据 vendor,所有数据获取入口tradingagents/dataflows/utils.py—safe_ticker_component路径安全校验 + 中文 ticker 自动解析tradingagents/agents/— 7 个 Analyst + Bull/Bear 辩论逻辑web/— Streamlit Web UIcli/— CLI 入口
中文股票名解析链路
用户/LLM 输入 → safe_ticker_component 检测中文 → resolve_ticker() → _build_name_code_map()(mootdx 全市场映射,缓存)→ 返回 6 位代码
已知问题与注意事项
依赖冲突(v0.2.6 已缓解)
mootdx 钉死 httpx>=0.25,<0.26,与 langchain-google-genai 所需的 httpx>=0.28.1 结构性冲突(该区间内每个 google-genai 版本都要 0.28.1,无解)。
v0.3.1 起 [google] extra 已移除(#87):uv 构建覆盖所有 extra 的 universal lock,extra 存在就让所有人的 uv sync 失败。留空更糟(pip install .[google] 静默装空)。需要 Gemini 时显式装 pip install --no-deps "langchain-google-genai>=4.0.0" + pip install "google-genai>=1.53.0" "httpx>=0.28.1";google_client.py 导入失败会打印这两条命令。⚠️ 新增依赖后务必跑 uv lock --dry-run 验证——pip 能装通不代表 uv 能锁。
akshare 已移除(v0.2.5)
v0.2.5 起完全移除 akshare 依赖,所有数据通过直连 HTTP API 获取。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago Changed bf3628a3245d
- 26d ago Changed · +9 lines · +338 tokens per session 46d61d42bb10
- 1mo ago Changed · +15 lines · +314 tokens per session 24921a1dff61
- 2mo ago Changed b6f4a4bec143
- 2mo ago Changed 6ea2357e3e99
- 2mo ago First seen · 151 lines · 3,359 tokens per session scan A 074c18da4139
TradingAgents-astock CLAUDE.md is an instructions file published in the GitHub repository simonlin1212/TradingAgents-astock (3,913 stars, last pushed 7d ago), licensed Apache-2.0. It adds 4,011 tokens to every session, about $0.0160 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
TradingAgents-astock CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| TradingAgents-astock CLAUDE.mdsimonlin1212/TradingAgents-astock | Instructions file | 3.9k | 7d ago | Apache-2.0 | A | 4,011 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |