📈 GH Trending Explorer 🎲 Surprise me

← all repos

rootSunc / CNEquity

git clone https://github.com/rootSunc/CNEquity.git v0.18.0 · 4d ago

中国 A 股数据基础设施。55个日更数据集:股票行情、基本面、期货数据、资金面、公告事件、指数行业、宏观与风险。行级溯源、PIT 语义、复权与历史成分内置,MCP 原生。自托管,零注册、零 API Token

+11
stars, 24h · #1,296
+~77
stars, 7 days · #1,622
+~330
stars, 30 days · #1,577
804
★ total · +11% this week
91
forks · 3 open issues

Star history (as recorded here)

2026-10-20 · 754 ★ 2026-10-22 · 804 ★
LanguagePython
LicenseApache-2.0
Created2026-06-28 (3mo ago)
Last push4d ago
Watchers6
OwnerUser

GitHub topics

Links

README excerpt
CNEquity · 中国市场金融数据湖 
 打破数据垄断,构建属于每个人的本地金融数据集 
CNEquity 将股票行情、期货合约、财报、公司事件和资金面等多源数据整理为本地 Parquet 数据湖,提供增量采集、失败续跑、质量审计与统一查询。适合反复回测、长期积累历史数据,为个人研究者和 AI Agent 提供一套完整的本地金融数据方案。
English · 完整文档 · 数据集目录 · 更新日志
*`cne serve` 控制台真实录屏。*
## 快速开始
需要 Python 3.10+(macOS / Linux / Windows),不需要账号或 token。命令行和控制台支持中英文,默认跟随系统语言,`export CNE_LANG=zh_CN` 可固定为中文。
**① 一分钟试用。** 用真实数据源抓 5 只股票最近 30 个交易日,建在独立目录里,不影响以后的正式湖:
 [code] 
**② 让 AI 直接查 A 股。** 把湖以只读方式接给 Claude、ChatGPT、Codex、Gemini CLI、Cursor、VS Code 等支持 MCP 的客户端(`--config` 用绝对路径)。以 Claude Code 为例:
 [code] 
各家客户端的写法见 MCP 接入指南;ChatGPT 只接公网网址,用 `cne mcp --http --token` 加隧道接入。然后直接问:「宁德时代最近 30 个交易日的最高收盘价是哪天?」
**③ 建正式湖。** 沪深京全市场、最近 3 年:
 [code] 
 [code] 
之后每天运行一次 `cne run daily` 保持更新。想要更长的历史,或了解 `init` 具体做了什么,见初始化指南。
## 数据范围
当前开发树注册 **55 个数据集:47 个 curated + 8 个 derived**,按用途分为 L0–L9。完整字段、主键、历史起点和来源集中在数据集目录与数据源说明。
| 层次 | 研究用途 | 代表数据集 |
|---|---|---|
| L0 | 基础参考 | 证券主数据、交易日历、交易状态 |
| L1 | 行情 | 日线、指数、复权因子、可选分钟线与分笔、退市事件 |
| L2 | 公司事件 | 公司行为、公告索引、业绩披露预约 |
| L3 | 基本面 | 财报、估值、股本、股东、一致预期 |
| L4 | 资金面 | 北向、融资融券、龙虎榜、大宗交易、资金流 |
| L5 | 结构行业 | 指数成分、行业与板块成分、行业指数 |
| L6 | 宏观 | 宏观指标、市场宽度 |
| L7 | 舆情与轮动 | 新闻、快讯、情绪、人气、板块行情与资金流 |
| L8 | 风险合规 | 解禁日程、监管事件 |
| L9 | 衍生品 | 期货与期权合约、逐合约行情、连续合约、Greeks、分钟线 |
分钟线、分笔和期货/期权默认关闭;按需启用后仍须检查来源的历史视野与实际覆盖。
 展开注册表的主备来源速查(实际路由与历史限制见数据集目录) 
| 数据集 | 层次 | 登记主源 | 登记备源 |
|---|---|---|---|
| `instruments` | L0 | tdx_protocol | baostock |
| `etf_profiles` | L0 | exchange | — |
| `trading_calendar` | L0 | tdx_protocol | exchange |
| `trading_status` | L0 | eastmoney | exchange |
| `adj_factors` | L1 | sina | baostock |
| `daily_bars` | L1 | tdx_protocol | eastmoney |
| `delisting_events` | L1 | derived | — |
| `index_bars` | L1 | tdx_protocol | eastmoney |
| `minute_bars` | L1 | tdx_protocol | — |
| `minute_bars_5m` | L1 | tdx_protocol | — |
| `minute_bars_15m` | L1 | derived | — |
| `minute_bars_30m` | L1 | derived | — |
| `minute_bars_60m` | L1 | derived | — |
| `trade_ticks` | L1 | tdx_protocol | — |
| `announcement_index` | L2 | cninfo | — |
| `corporate_actions` | L2 | eastmoney | tdx_protocol |
| `earnings_disclosure_schedule` | L2 | eastmoney | — |
| `analyst_consensus` | L3 | eastmoney | — |
| `financial_statement_items` | L3 | eastmoney | — |
| `share_structure` | L3 | eastmoney | — |
| `shareholder_counts` | L3 | eastmoney | — |
| `top_holders` | L3 | eastmoney | — |
| `valuation_metrics` | L3 | eastmoney | — |
| `block_trades` | L4 | eastmoney | exchange |
| `dragon_tiger` | L4 | eastmoney | exchange |
| `fund_flow` | L4 | eastmoney | — |
| `fund_flow_ths` | L4 | ths | — |
| `institutional_holdings` | L4 | eastmoney | — |
| `margin_trading` | L4 | exchange | — |
| `northbound_flows` | L4 | eastmoney | — |
| `northbound_holdings` | L4 | eastmoney | — |
| `index_constituents` | L5 | eastmoney | — |
| `industry_index` | L5 | derived | — |
| `industry_members` | L5 | eastmoney | — |
| `sector_members` | L5 | eastmoney | — |
| `macro_indicators` | L6 | eastmoney | pboc |
| `market_breadth` | L6 | derived | — |
|