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.03359 | $0.03359 |
| Opus 5 | $0.01680 | $0.01680 |
| Sonnet 5 | $0.00672 | $0.00672 |
| Haiku 4.5 | $0.00336 | $0.00336 |
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 4d 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 — 151 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.17(2026-09-05 发布)
⚠️ 改版本号时三处要一起改:
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.
- 4d ago Changed b6f4a4bec143
- 7d ago Changed 6ea2357e3e99
- 9d 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,222 stars, last pushed 4d ago), licensed Apache-2.0. It adds 3,359 tokens to every session, about $0.0168 per session on Opus 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.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.