sec-fundamentals-pit
收藏资源简介:
SEC EDGAR Fundamentals (PIT) 数据集是一个点时间公司基本面数据集,专为金融回测设计。数据来源于美国证券交易委员会(SEC)EDGAR系统中的XBRL公司事实文件,属于美国政府的公共领域。该数据集提供按实际报告时间存储的公司财务数据,包括收入、稀释每股收益、净利润和总资产等关键指标,旨在避免在回测模拟中因数据重述或发布滞后导致的信息泄露。数据集覆盖93家美国上市发行人,包含23,580条记录,事件日期范围从2006年12月31日至2026年6月13日,知识日期(文件公开日期)从2009年5月7日至2026年7月9日。数据以ziplime Delta Lake包格式存储,按知识年份分区,每日更新以跟随EDGAR文件索引。主要字段包括实体ID(股票代码)、事件日期(财务期间结束日期)、知识日期、知识估计标志、摄取时间,以及数值字段如收入、稀释每股收益、净利润、总资产等,还包括财务期间、文件表格类型和SEC登记号。逻辑键为(实体ID, 事件日期),允许跟踪同一财务期间在不同知识日期的修订(如重述)。数据集适用于时间序列预测、回测策略开发等任务,支持在ziplime框架内通过as_of方法进行点时间访问,或通过Polars和delta-rs外部读取。
The SEC EDGAR Fundamentals (PIT) dataset is a point-in-time company fundamentals dataset designed for financial backtesting. It is sourced from XBRL company fact files in the U.S. Securities and Exchange Commission (SEC) EDGAR system and is in the public domain of the U.S. government. The datasets core purpose is to provide company financial data stored by actual reporting time, including key metrics such as revenue, diluted earnings per share, net income, and total assets, ensuring no information leakage in backtesting simulations due to data restatements or publication lags. The dataset covers 93 U.S. listed issuers, containing 23,580 records by reported facts, with event dates ranging from December 31, 2006, to June 13, 2026, and knowledge dates (i.e., file publication dates) from May 7, 2009, to July 9, 2026. The data is stored in ziplime Delta Lake package format, partitioned by knowledge year, and updated daily to follow the EDGAR file index. Key fields include entity ID (ticker), event date (financial period end date), knowledge date, knowledge estimate flag (always false), ingestion time, and numerical fields such as revenue, diluted EPS, net income, total assets, along with financial period, filing form type, and SEC accession number. The logical key is (entity ID, event date), allowing tracking of revisions (e.g., restatements) for the same financial period across different knowledge dates. The dataset is suitable for tasks like time series forecasting and backtesting strategy development, supporting point-in-time access via the as_of method within the ziplime framework or external reading via Polars and delta-rs.
数据集概述:SEC EDGAR Fundamentals (PIT)
该数据集提供基于美国证券交易委员会(SEC)EDGAR系统XBRL公司事实的时点(Point-in-Time, PIT) 基本面数据,按提交时间(filing time) 而非会计期间进行键控,确保回测中不会因重述或发布延迟产生前瞻性偏差。
基本信息
- 许可证: CC0-1.0(公共领域)
- 语言: 英语
- 数据类别: 基本面数据(SEC EDGAR/XBRL公司事实)
- 实体域: 美国股票(
us_equities),以股票代码(ticker)为键 - 覆盖范围: 93个发行人,23,580条已报事实(含重述历史)
- 时间范围:
event_date(事件日期):2006-12-31 ~ 2026-06-13;knowledge_date(知晓日期):2009-05-07 ~ 2026-07-09 - 数据来源: SEC EDGAR公司事实(XBRL),美国政府公共领域数据
- 更新频率: 每日更新,遵循EDGAR提交索引(调度:
0 5 * * *) - 数据格式: ziplime Delta Lake捆绑包(数据类型:
PIT_DATA),按knowledge_year分区
数据结构
主键列
| 列名 | 类型 | 说明 |
|---|---|---|
entity_id |
Utf8 | 发行人的股票代码 |
event_date |
Timestamp(UTC, µs) | 事实所指的期末日期 |
knowledge_date |
Timestamp(UTC, µs) | 事实公开的提交日期——仅用于时间点过滤 |
knowledge_estimated |
Boolean | 提交日期是否为模拟(此处始终为false) |
ingested_at |
Timestamp(UTC, µs) | 管道写入时间(仅用于审计) |
值列
| 列名 | 类型 | 说明 |
|---|---|---|
revenue |
Float64 | 期间总营收 |
eps_diluted |
Float64 | 摊薄每股收益 |
net_income |
Float64 | 净利润 |
total_assets |
Float64 | 总资产(资产负债表日期) |
fiscal_period |
Utf8 | 会计期间标识,如FY2024、2024Q3 |
form |
Utf8 | 提交表格类型:10-K、10-Q、10-K/A等 |
accession_no |
Utf8 | SEC受理号(用于溯源) |
逻辑键: (entity_id, event_date)。修订(重述)表现为同一键值下knowledge_date更晚的新行。
时点(Point-in-Time)访问
- ziplime内部:通过
context.pit("sec-fundamentals-pit")加载,使用latest()或as_of()方法获取特定时刻可知的数据,无需显式传入时间参数T。 - 外部读取(Polars + delta-rs):从Hugging Face下载数据后,对Delta表进行
knowledge_date <= T过滤,并按(entity_id, event_date)分组取最后一条记录,以获得截至时间T的已知状态。 - 数据按
knowledge_year分区,knowledge_date过滤可以在分区层面进行剪枝。Delta表的时间旅行(AS OF <version>)可用于固定数据版本。
更新机制
recipe.py:从SEC公司事实接口获取数据(fetch(since) -> pl.DataFrame)ingest.py:去重并追加到Delta捆绑包(从不重写).github/workflows/update.yml:每日调度的持续集成任务
仓库文件结构
README.md # 数据集卡片 manifest.json # PIT清单(模式、来源、覆盖范围) recipe.py # 数据获取脚本 ingest.py # 去重与追加写入脚本 .github/workflows/update.yml # 每日更新调度 data/ # ziplime Delta捆绑包与注册清单 bundle_registry/sec_fundamentals_pit_1784818614.json data_bundle/sec_fundamentals_pit/1784818614/data.delta/ (按knowledge_year分区)
来源与许可证
数据源自SEC EDGAR XBRL公司事实(美国联邦政府作品,公共领域),经dartlab-data镜像重组为ziplime PIT模式。提交日期(filed)直接用作knowledge_date;事实期间根据各事实自身的报告窗口分类。未对任何数值进行填充或估算。




