File size: 3,706 Bytes
75008a0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | ---
language:
- en
license:
- other
size_categories:
- 100M<n<1B
task_categories:
- tabular-classification
- tabular-regression
tags:
- finance
- sec
- edgar
- duckdb
- datapond
---
# SEC EDGAR Financial Statement Data Sets
This dataset contains structured, numeric data extracted from corporate financial statements (10-K, 10-Q, 8-K, etc.) filed with the U.S. Securities and Exchange Commission (SEC).
It has been processed into a highly compressed, instantly queryable **DuckDB** database as part of the [Datapond](https://datapond-db.github.io/website/) open-source registry.
## Dataset Details
- **Source:** [U.S. Securities and Exchange Commission](https://www.sec.gov/dera/data/financial-statement-data-sets)
- **Timeframe:** 15 Years (2009 to 2026)
- **Format:** DuckDB (`sec_edgar.duckdb`)
- **Row Count:** ~231.5 Million rows
- **Size:** ~5.27 GB
- **License:** Public Domain
## How to use with Datapond
Since this database is hosted on Hugging Face, you can query it **remotely over HTTP** without downloading the entire 1GB file!
First, install the Datapond Python client:
```bash
pip install datapond
```
Then, execute SQL directly against this repository:
```python
import datapond
# Connect to the remote DuckDB file
con = datapond.connect("sec_edgar")
# Query the database
df = con.execute("""
SELECT s.name, n.tag, n.value, n.ddate
FROM numbers n
JOIN submissions s ON n.adsh = s.adsh
WHERE n.tag = 'NetIncomeLoss'
LIMIT 10
""").df()
print(df)
```
## Schema
*For a complete list of columns, data types, and definitions, please refer to the [DICTIONARY.md](DICTIONARY.md) file.*
The database contains the following core tables:
- `submissions` (`sub.txt`): Index of all filings, company names, industry codes, and filing dates.
- `numbers` (`num.txt`): The actual numeric financial data points (Assets, Liabilities, Net Income, etc.).
- `presentations` (`pre.txt`): How line items are presented in the statements.
- `tags` (`tag.txt`): Definitions and labels for the XBRL financial tags.
- `_metadata`: Required Datapond registry metadata.
## How to Build
If you wish to rebuild the database locally from the raw SEC files:
1. (Optional) If you want the script to automatically generate the Datapond `DICTIONARY.md`, ensure the Datapond registry repository is cloned in a sibling directory:
```bash
git clone https://github.com/datapond-db/registry.git ../registry
```
2. Ensure you have `uv` installed, then set your SEC user agent (required by the SEC EDGAR API to prevent rate-limiting/blocks):
```bash
# On Windows PowerShell
$env:SEC_USER_AGENT="Your Name your.email@example.com"
# On Mac/Linux
export SEC_USER_AGENT="Your Name your.email@example.com"
```
3. Run the orchestration script:
```bash
uv run python main.py
```
*(Tip: You can run a quick test build of just the last 4 quarters instead of the full 15-year dataset by passing `--quarters 4`)*
This script will:
- Download the raw ZIP files from the SEC
- Ingest them using explicit `schema.sql` strict typing
- Apply data transformations (e.g., date parsing, zero-padding CIKs)
- Generate Datapond `_columns` and `DICTIONARY.md` (if the registry repo exists)
- Clean up all temporary `raw/` files
## Citation
If you use this dataset in your research or application, please cite the U.S. Securities and Exchange Commission (SEC) as the data source:
```bibtex
@misc{sec_edgar_financial_statement_data_sets,
author = {{U.S. Securities and Exchange Commission}},
title = {Financial Statement Data Sets},
year = {2026},
url = {https://www.sec.gov/dera/data/financial-statement-data-sets},
note = {Data extracted from corporate financial statements filed with the SEC.}
}
```
|