trader298/sec-nport
SEC Form N-PORT Data Sets Monthly portfolio holdings reported by registered investment companies and ETFs on Form N-PORT, published by the U.S. SEC as quarterly structured data sets and mirrored here as typed, partitioned Parquet — queryable directly from DuckDB. Source: SEC Form N-PORT Data Sets — public domain (U.S. Government work) https://www.sec.gov/data-research/sec-markets-data/form-n-port-data-sets Coverage: October 2019 onward, refreshed quarterly Format: one Parquet… See the full description on the dataset page: https://huggingface.co/datasets/trader298/sec-nport.
SEC Form N-PORT Data Sets
Monthly portfolio holdings reported by registered investment companies and ETFs on Form N-PORT, published by the U.S. SEC as quarterly structured data sets and mirrored here as typed, partitioned Parquet — queryable directly from DuckDB.
- Source: SEC Form N-PORT Data Sets — public domain (U.S. Government work) <https://www.sec.gov/data-research/sec-markets-data/form-n-port-data-sets>
- Coverage: October 2019 onward, refreshed quarterly
- Format: one Parquet dataset per table, hive-partitioned by source filing quarter
- Built by: <https://github.com/ak2k/sec-nport> — a quarterly GitHub Action. Column types are derived from the CSVW schema (
nport_metadata.json) the SEC ships in each ZIP: money asDECIMAL(36,12), surrogate keys asBIGINT, dates asDATE.
Dataset structure
Each of the 30 N-PORT tables is a separate subset (config), laid out as:
<TABLE>/year=YYYY/quarter=N/data.parquetPartitioning by the source filing quarter means a query that filters on year/quarter prunes to just those files.
SUBMISSION, REGISTRANT, FUND_REPORTED_INFO and the monthly-return/risk tables key on `ACCESSION_NUMBER` (one filing). FUND_REPORTED_HOLDING (every holding of every fund) keys on `HOLDING_ID`, and the per-holding detail tables (IDENTIFIERS, DEBT_SECURITY, derivatives, …) join back on it.
Field-level definitions for every column are in the SEC's data dictionary: <https://www.sec.gov/files/nport_readme.pdf>.
Usage
Query in place with DuckDB — no download, partition pruning over the whole history:
-- one filing's largest reported holdings
SELECT ISSUER_NAME, ISSUER_CUSIP, CURRENCY_VALUE
FROM 'hf://datasets/trader298/sec-nport/FUND_REPORTED_HOLDING/year=2024/quarter=1/*.parquet'
ORDER BY CURRENCY_VALUE DESC
LIMIT 20;
-- across all quarters (prunes by the year/quarter partitions)
SELECT year, count(*) AS holdings
FROM 'hf://datasets/trader298/sec-nport/FUND_REPORTED_HOLDING/**/*.parquet'
GROUP BY year ORDER BY year;Or load a table with the datasets library (use streaming=True for the large holdings tables):
from datasets import load_dataset
ds = load_dataset("trader298/sec-nport", "FUND_REPORTED_HOLDING", split="train", streaming=True)Provenance & caveats
Data is provided as-filed by registrants (including amendments) and may contain redundancies or inconsistencies relative to other publications. This is an unofficial mirror; the SEC is the authoritative source. Not investment advice.
Citation
Source data — U.S. Securities and Exchange Commission, Form N-PORT Structured Data Sets (public domain). This Parquet mirror — <https://github.com/ak2k/sec-nport>.
