fin-data-acquisition

fin-data-acquisition is a skill for Claude Code, Codex from csmar432/finai-research. It costs 36 tokens per session (2,810 once invoked), scanned A, original, MIT.

A data-preparation workflow for financial research. It reads variable definitions from a completed research design and produces data-acquisition work plus executable Python or Stata regression scripts.

In plain words
What is it for?
Use it to identify data requirements, check possible sources, obtain financial or macroeconomic data, and prepare scripts for regression analysis.
Why use it?
It checks whether required data sources are available before downloading anything and avoids silently replacing missing data with simulated or invented results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to identify data requirements, check possible sources, obtain financial or macroeconomic data, and prepare scripts for regression analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/csmar432/finai-research/fin-data-acquisition
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add csmar432/finai-research --skill fin-data-acquisition
Clone the repo
git clone --depth 1 https://github.com/csmar432/finai-research

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for fin-data-acquisition

README.md
[![agentmods](https://agentmods.dev/badge/skills/csmar432/finai-research/fin-data-acquisition/github.svg)](https://agentmods.dev/skills/csmar432/finai-research/fin-data-acquisition)
Your own site
<a href="https://agentmods.dev/skills/csmar432/finai-research/fin-data-acquisition"><img src="https://agentmods.dev/badge/skills/csmar432/finai-research/fin-data-acquisition/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.

agentmods 80×15 button for fin-data-acquisition

Your own site · 80×15
<a href="https://agentmods.dev/skills/csmar432/finai-research/fin-data-acquisition"><img src="https://agentmods.dev/badge/skills/csmar432/finai-research/fin-data-acquisition.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,810 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.02810
Opus 5 $0.00018 $0.01405
Sonnet 5 $0.00007 $0.00562
Haiku 4.5 $0.00004 $0.00281

Measured 12d ago against content hash 03bd0a8ffd18, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

fin-data-acquisition scanned grade A with 0 findings 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 12d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/fin-data-acquisition/SKILL.md · 370 lines

How it starts

The opening of the file, as written. The whole thing — 370 lines — stays where its author put it; the contents beside it link to each section on GitHub.

fin-data-acquisition

根据REFINED_DESIGN.md中的变量定义,自动获取所需数据并生成可执行的回归分析脚本(Python/Stata)。

触发条件

  • 关键词: 获取数据 数据获取 data acquisition 下载数据 数据准备 实证数据
  • Skill语法: Skill: fin-data-acquisition
  • 前置条件: 已完成 REFINED_DESIGN.md (研究设计文档)

核心原则

禁止行为 (未经用户明确授权不得执行)

❌ 静默回退到模拟数据
❌ 自动生成虚假回归结果
❌ 在用户未同意情况下继续流水线使用模拟数据
❌ 跳过数据源预检查直接获取数据

数据源预检查 (强制执行)

在任何数据获取前,必须先运行数据源检查:

from scripts.data_source_checker import DataSourceChecker, DataRequirement

# 第一步:定义数据需求
requirements = [
    DataRequirement(
        name="financial_data",
        user_facing_name="A股财务数据",
        description="ROA、资产负债率、企业规模、研发投入",
        sources=["tushare", "wind", "csmar", "akshare"],
        required=True,
    ),
    DataRequirement(
        name="esg_data",
        user_facing_name="ESG评级",
        sources=["msci", "商道融绿", "华证"],
        required=False,
    ),
    DataRequirement(
        name="macro_data",
        user_facing_name="宏观数据",
        sources=["user-financial", "user-wb-data", "user-imf-data"],
        required=True,
    ),
]

# 第二步:运行数据源检查
checker = DataSourceChecker()
results = checker.check(requirements)

# 第三步:展示可用性报告
checker.print_report(results)

数据源Fallback链

每个数据类型都有明确的降级路径:

A股财务数据

tushare (需TUSHARE_TOKEN)
  ↓ 失败/无Token
wind (需Wind账号)
  ↓ 失败/无账号
csmar (需机构账号)
  ↓ 失败/无账号
akshare (免费,备选)
  ↓ 失败
手动下载 -> 询问用户

宏观数据

user-financial (akshare, 免费)
  ↓ 失败
user-wb-data (World Bank, 免费)
  ↓ 失败
user-imf-data (IMF, 免费)
  ↓ 失败
手动下载 -> 询问用户

美股数据

user-yfinance (免费)
  ↓ 失败
user-eodhd (需EODHD_API_KEY)
  ↓ 失败/无Key
手动下载 -> 询问用户

学术文献数据

user-openalex (免费)
  ↓ 失败
user-arxiv (免费)
  ↓ 失败
user-nber-wp (免费)
  ↓ 失败
手动检索 -> 询问用户

DataFetcher API

from scripts.research_framework import DataFetcher, ProvenanceTracker

# 初始化 (带数据溯源)
tracker = ProvenanceTracker(output_dir="data/provenance/")
fetcher = DataFetcher(output_dir="data/", tracker=tracker, verbose=True)

# ============ 面板数据获取 ============
df = fetcher.fetch_panel(
    tickers=["000001.SZ", "600000.SH"],
    years=["2018", "2019", "2020", "2021", "2022"],
    statements=["balance", "income", "cashflow"],
    include_sustainability=True,  # ESG数据
)

# ============ 财务报表获取 ============
fin = fetcher.fetch_financials("000001.SZ", "income")  # 利润表
fin = fetcher.fetch_financials("000001.SZ", "balance")  # 资产负债表
fin = fetcher.fetch_financials("000001.SZ", "cashflow")  # 现金流量表

# ============ 公司信息获取 ============
info = fetcher.fetch_ticker_info("000001.SZ")  # 股票基本信息

# ============ ESG/可持续发展数据 ============
sust = fetcher.fetch_sustainability("000001.SZ")  # ESG评级等

# ============ 宏观数据获取 ============
macro = fetcher.fetch_macro(indicator="gdp", country="CHN")

# ============ 融资融券数据 ============
margin = fetcher.fetch_margin(ts_code="000001.SZ", start_date="20180101")

# ============ 陆股通/港股通 ============
hgt = fetcher.fetch_hsgt_top10(date="20240101")

# ============ 分析师预测 ============
forecast = fetcher.fetch_consensus("000001.SZ")

Read the full file on GitHub · 370 lines

Changes

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.

  1. 12d ago First seen · 370 lines · 36 tokens per session scan A 03bd0a8ffd18

Subscribe to this mod's changes

fin-data-acquisition is a skill published in the GitHub repository csmar432/finai-research (100 stars, last pushed 3d ago), licensed MIT. It adds 36 tokens to every session and 2,810 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.