Install any skill in seconds. Free to start, no credit card required.
Get Started Free →AI Berkshire skill: 财务数据获取与交叉验证规范. Source: skills/financial-data.md.
.claude/skills/xbtlin-financial-data/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 60% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 85% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 116% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 77% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 88% | 0% |
This skill is generated from skills/financial-data.md so Claude Code and Codex users share one canonical workflow.
$ARGUMENTS as the user's request in the current Codex thread.tools/ in this repository. Prefer running commands from the repository root with paths like python3 tools/financial_rigor.py ...; if the current thread starts outside the repo, locate the actual checkout path first instead of assuming a fixed home-directory path.date command to confirm today's date; treat it as the baseline for "latest" data and state the data cutoff date in the report header. Never assume the current date from training data.AGENTS.md: cross-check financial data, use exact arithmetic tools for valuation/math, and clearly label uncertainty and source gaps.本规范适用于所有涉及企业财务数据的研究。每个关键数据必须来自两个独立来源,误差>1%须标记。
| 优先级 | 来源 | URL | 获取方式 | |--------|------|-----|---------| | 1(主) | macrotrends | macrotrends.net/stocks/charts/{ticker} | 直接访问,无需注册 | | 2(副) | stockanalysis | stockanalysis.com/stocks/{ticker}/financials | 直接访问,无需注册 | | 原始一手 | SEC EDGAR | sec.gov/cgi-bin/browse-edgar | 10-K / 10-Q 原文 |
| 优先级 | 来源 | URL | 获取方式 | |--------|------|-----|---------| | 1(主) | aastocks | aastocks.com/tc/stocks/analysis/company-fundamental | 直接访问 | | 2(副) | macrotrends(ADR代码) | 腾讯用TCEHY,网易用NTES | 直接访问 | | 原始一手 | HKEX披露易 | hkexnews.hk | 年报PDF |
| 优先级 | 来源 | URL | 获取方式 | |--------|------|-----|---------| | 1(主) | 东方财富 | eastmoney.com → 搜股票代码 → 财务报表 | 直接访问 | | 2(副) | 巨潮资讯 | cninfo.com.cn | 原始年报/季报PDF |
| 优先级 | 来源 | URL | 获取方式 | |--------|------|-----|---------| | 1(主) | FinMind API | api.finmindtrade.com | tools/twstock_data.py(零依赖脚本,见下) | | 2(副) | Goodinfo台湾股市资讯网 | goodinfo.tw/tw/StockDetail.asp?STOCK_ID={代码} | 直接访问 | | 原始一手 | 公开资讯观测站(MOPS) | mops.twse.com.tw | 财报原文/月营收公告 |
FinMind 取数工具(分析台股时优先调用,输出自带市值验算):
bashpython3 tools/twstock_data.py quote 2330 # 最新行情 + PER/PBR/殖利率 + 市值验算 python3 tools/twstock_data.py valuation 2330 # 估值指标 + PER一年区间 + 52周高低 python3 tools/twstock_data.py financials 2330 # 近5年年度核心财务(营收/毛利率/归母净利/EPS/ROE) python3 tools/twstock_data.py revenue 2330 # 近13个月月营收及同比 python3 tools/twstock_data.py dividend 2330 # 近年股利政策(现金/股票股利、除息日) python3 tools/twstock_data.py search 台積 # 搜索股票代码(注意台股名称为繁体)
台股特别注意:
revenue 子命令)FINMIND_TOKEN;②本地文件 local/finmind_token.txt(local/ 已被 .gitignore 永久排除,把 token 单独一行写入该文件即可)。token 不得出现在报告、skill、commit 中对每个财务指标(收入、净利润、毛利率、经营现金流、资产负债率等),分别从来源1和来源2取数。
误差率 = |来源1数值 - 来源2数值| / 来源1数值 × 100%| 误差 | 处理方式 | |------|---------| | ≤ 1% | ✅ 一致,取来源1数值,标注两个来源 | | 1% ~ 5% | ⚠️ 标记"数据存在差异",注明两个数值,说明可能原因(汇率/会计口径) | | > 5% | ❌ 标记"数据存在重大差异",必须查原始财报核实,不得直接使用 |
每个关键数据必须按以下格式标注:
收入:1,239亿元 ✅
- macrotrends: 1,241亿元
- stockanalysis: 1,237亿元
- 误差: 0.3%差异示例:
净利润:245亿元 ⚠️ 数据存在差异
- macrotrends: 245亿元(GAAP)
- stockanalysis: 278亿元(Non-GAAP)
- 误差: 13.5% — 原因:会计口径不同(GAAP vs Non-GAAP)| 原因 | 说明 | |------|------| | GAAP vs Non-GAAP | 最常见,尤其是利润类数据 | | 汇率换算 | 港币/人民币/美元换算时间点不同 | | 财年定义 | 自然年 vs 财年(如苹果财年10月结束) | | 合并口径 | 是否含少数股东权益 | | 数据更新滞后 | 某平台尚未更新最新一期财报 |
[估计],不执行交叉验证价格有三种口径,混用会让历史股价位置、长期涨幅、历史估值分位全部失真:
| 口径 | 含义 | 用途 | |------|------|------| | 不复权 | 实际成交价,除权除息日跳空 | 仅用于"当前时点"快照 | | 前复权 | 以最新价为基准回调历史价 | 历史股价对比、N年涨幅、历史PE band 一律用它 | | 后复权 | 以上市首日为基准前推 | 计算历史总回报/年化收益 |
规则:
financial_rigor.py verify-market-cap 偏差>5% 会提示核对)。| 场景 | 主要来源 | 备用来源 | |------|---------|---------| | PDD / 拼多多 | macrotrends.net/stocks/charts/PDD | stockanalysis.com/stocks/pdd | | 腾讯 | macrotrends.net/stocks/charts/TCEHY | aastocks(0700.HK) | | 网易 | macrotrends.net/stocks/charts/NTES | aastocks(9999.HK) | | 三七互娱 | eastmoney.com(002555) | cninfo.com.cn | | 吉比特 | eastmoney.com(603444) | cninfo.com.cn | | Nintendo | macrotrends.net/stocks/charts/NTDOY | stockanalysis.com/stocks/ntdoy | | Capcom | macrotrends(CCOEY) | stockanalysis(CCOEY) | | 台积电 | tools/twstock_data.py(2330) | goodinfo.tw / macrotrends(TSM,注意1 ADR=5股) | | 联发科 | tools/twstock_data.py(2454) | goodinfo.tw |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-10 | pass→pass | 5,474 | 5,622 | +3% | 1 | 1 | 0% | 892 | 3,300 | +270% | 0 | 0 | — |
case-04 | fail→fail | 11,484 | 6,232 | -46% | 1 | 1 | 0% | 1,925 | 3,470 | +80% | 0 | 0 | — |
case-01 | fail→fail | 17,430 | 7,941 | -54% | 1 | 1 | 0% | 3,318 | 2,832 | -15% | 0 | 0 | — |
case-02 | fail→fail | 16,963 | 5,558 | -67% | 1 | 1 | 0% | 3,129 | 2,826 | -10% | 0 | 0 | — |
case-03 | fail→fail | 19,093 | 6,383 | -67% | 1 | 1 | 0% | 3,618 | 2,896 | -20% | 0 | 0 | — |
case-05 | fail→pass | 12,447 | 4,133 | -67% | 1 | 1 | 0% | 1,975 | 3,162 | +60% | 0 | 0 | — |
case-06 | fail→pass | 12,286 | 7,523 | -39% | 1 | 1 | 0% | 2,094 | 3,874 | +85% | 0 | 0 | — |
case-07 | pass→pass | 11,840 | 4,472 | -62% | 1 | 1 | 0% | 1,727 | 3,134 | +81% | 0 | 0 | — |
case-08 | pass→pass | 8,604 | 6,437 | -25% | 1 | 1 | 0% | 1,270 | 3,394 | +167% | 0 | 0 | — |
case-09 | fail→pass | 11,146 | 7,257 | -35% | 1 | 1 | 0% | 1,742 | 3,758 | +116% | 0 | 0 | — |
case-11 | pass→pass | 19,996 | 10,501 | -47% | 1 | 1 | 0% | 1,926 | 3,385 | +76% | 0 | 0 | — |
case-12 | fail→pass | 10,705 | 3,630 | -66% | 1 | 1 | 0% | 1,734 | 3,064 | +77% | 0 | 0 | — |
case-13 | pass→pass | 5,326 | 5,109 | -4% | 1 | 1 | 0% | 936 | 3,360 | +259% | 0 | 0 | — |
case-14 | fail→pass | 13,600 | 10,672 | -22% | 1 | 1 | 0% | 2,170 | 4,080 | +88% | 0 | 0 | — |
case-19 | fail→fail | 7,447 | 2,320 | -69% | 1 | 1 | 0% | 1,044 | 2,864 | +174% | 0 | 0 | — |
case-15 | fail→pass | 13,335 | 4,545 | -66% | 1 | 1 | 0% | 2,324 | 3,324 | +43% | 0 | 0 | — |
case-16 | fail→pass | 18,549 | 6,915 | -63% | 1 | 1 | 0% | 3,606 | 3,504 | -3% | 0 | 0 | — |
case-17 | pass→pass | 9,863 | 6,526 | -34% | 1 | 1 | 0% | 1,557 | 3,629 | +133% | 0 | 0 | — |
case-18 | fail→pass | 9,690 | 4,512 | -53% | 1 | 1 | 0% | 1,684 | 3,238 | +92% | 0 | 0 | — |
case-20 | pass→pass | 8,262 | 5,212 | -37% | 1 | 1 | 0% | 1,220 | 3,243 | +166% | 0 | 0 | — |
case-21 | fail→pass | 15,914 | 8,662 | -46% | 1 | 1 | 0% | 2,574 | 3,566 | +39% | 0 | 0 | — |
case-22 | pass→pass | 8,124 | 8,034 | -1% | 1 | 1 | 0% | 1,389 | 3,841 | +177% | 0 | 0 | — |
case-23 | pass→fail | 22,749 | 6,859 | -70% | 1 | 1 | 0% | 5,016 | 3,086 | -38% | 0 | 0 | — |
case-24 | pass→fail | 19,431 | 5,044 | -74% | 1 | 1 | 0% | 3,441 | 2,707 | -21% | 0 | 0 | — |
case-25 | pass→fail | 17,441 | 5,597 | -68% | 1 | 1 | 0% | 2,868 | 2,743 | -4% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted, and 19 counted toward the lift figure. The other 6 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +24 percentage points is the difference between those two pass rates over the 19 comparable cases. 5 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.