Update dataset card (XBRL and schema)
Browse files
README.md
CHANGED
|
@@ -10,6 +10,8 @@ tags:
|
|
| 10 |
- parquet
|
| 11 |
- reinforcement-learning
|
| 12 |
- sp500
|
|
|
|
|
|
|
| 13 |
size_categories:
|
| 14 |
- 10K-100K
|
| 15 |
task_categories:
|
|
@@ -24,7 +26,7 @@ pretty_name: S&P 500 earnings episodes (2005–2025; merged transcripts, prices,
|
|
| 24 |
|
| 25 |
# S&P 500 earnings episodes (2005–2025)
|
| 26 |
|
| 27 |
-
**Augmented release** built on [`Bose345/sp500_earnings_transcripts`](https://huggingface.co/datasets/Bose345/sp500_earnings_transcripts) (same transcript calendar span as that collection: **2005–2025**). Static tabular data for supervised learning or RL-style experiments on **earnings-call episodes**. Each row is one company–quarter call, keyed by a stable `episode_id`, with long-form text (full earnings transcript, SEC press materials), pre-earnings price context, OHLCV anchors, and **post-earnings return labels**.
|
| 28 |
|
| 29 |
**Companion report:** **`sweetviz_episodes.html`** — a **Sweetviz** profile of `episodes.parquet`, shipped in this dataset repo. [View on the Hub](https://huggingface.co/datasets/RudrakshNanavaty/earnings-call-data/blob/main/sweetviz_episodes.html) or download the [raw file](https://huggingface.co/datasets/RudrakshNanavaty/earnings-call-data/resolve/main/sweetviz_episodes.html) and open it locally in a browser (distributions, missingness, associations).
|
| 30 |
|
|
@@ -32,18 +34,19 @@ pretty_name: S&P 500 earnings episodes (2005–2025; merged transcripts, prices,
|
|
| 32 |
|
| 33 |
## What’s in this folder
|
| 34 |
|
| 35 |
-
These files are the **materialized outputs** of the build pipeline (upstream Hugging Face transcripts → Yahoo Finance prices → SEC EDGAR 8-K press text → feature engineering → merge). Intermediate download caches usually live under `data/cache/` locally and are **not** required for analysis if you only use the parquet files below.
|
| 36 |
|
| 37 |
| File | Role |
|
| 38 |
|------|------|
|
| 39 |
-
| **`episodes.parquet`** | **Primary dataset** — one row per episode with identity, text, features, OHLCV anchors, and labels (see [Schema](#schema-episodesparquet)). |
|
|
|
|
| 40 |
| **`sweetviz_episodes.html`** | **Exploratory HTML report** (Sweetviz) for `episodes.parquet`; same folder on the Hub as the parquet files ([see below](#sweetviz-html)). |
|
| 41 |
| `raw_hf.parquet` | Base transcript metadata and structured content source fields from the upstream Hugging Face dataset (see [Provenance](#provenance)). |
|
| 42 |
| `raw_prices.parquet` | Per-episode OHLCV anchors, sector, and price-derived fields from market data. |
|
| 43 |
| `raw_press_releases.parquet` | SEC 8-K body and exhibit text (e.g. EX-99.1 / EX-99.2) aligned to each episode. |
|
| 44 |
| `features.parquet` | Formatted earnings transcript, text flags, momentum/volume features, and label columns produced in the feature stage. |
|
| 45 |
|
| 46 |
-
Rough scale (after a full pipeline run): on the order of **~33k rows** and **hundreds of tickers** (in line with upstream transcript coverage), **2005–2025** span — confirm row and symbol counts on your copy with `len(pd.read_parquet("episodes.parquet"))` and `ep["symbol"].nunique()`.
|
| 47 |
|
| 48 |
---
|
| 49 |
|
|
@@ -65,6 +68,24 @@ Columns follow this order in the merged export:
|
|
| 65 |
|
| 66 |
**Audit / quality:** `next_qtr_date`
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
`sentiment_label` is derived from `move_1d` using fixed percentage bands (very bearish through very bullish). Treat labels as **historical hindsight** for research, not investment advice.
|
| 69 |
|
| 70 |
---
|
|
@@ -105,6 +126,7 @@ Sweetviz is a third-party tool; report content reflects the table at generation
|
|
| 105 |
- **Transcripts / call metadata:** same underlying universe and years as [`Bose345/sp500_earnings_transcripts`](https://huggingface.co/datasets/Bose345/sp500_earnings_transcripts) (this release **augments** those transcripts with market, SEC, and label columns; respect that dataset’s license and terms when redistributing derived work).
|
| 106 |
- **Market data:** via [yfinance](https://github.com/ranaroussi/yfinance) (subject to Yahoo / vendor terms of use).
|
| 107 |
- **Filings:** U.S. SEC EDGAR public data (comply with [SEC fair access](https://www.sec.gov/os/accessing-edgar-data) and rate-limiting expectations when re-fetching).
|
|
|
|
| 108 |
|
| 109 |
This package is a **processed merge** for research; it is not an official SEC or exchange product.
|
| 110 |
|
|
@@ -119,6 +141,14 @@ import pandas as pd
|
|
| 119 |
|
| 120 |
ep = pd.read_parquet("episodes.parquet")
|
| 121 |
print(ep.shape, ep.columns[:5].tolist())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
```
|
| 123 |
|
| 124 |
**Hugging Face `datasets`** (if you upload parquet to a Hub dataset repo)
|
|
@@ -134,7 +164,7 @@ print(ds)
|
|
| 134 |
|
| 135 |
## Use cases
|
| 136 |
|
| 137 |
-
- Train or evaluate models on **text + tabular market context** with aligned **forward returns**.
|
| 138 |
- Build **RL environments** where observations include call text and pre-earnings features and rewards depend on realized moves (subject to your own leakage and causality checks).
|
| 139 |
- Reproduce or extend the pipeline using the sibling repository that emits these files.
|
| 140 |
|
|
@@ -143,6 +173,7 @@ print(ds)
|
|
| 143 |
## Limitations
|
| 144 |
|
| 145 |
- Rows may contain **nulls** where a source (e.g. a filing or price window) was missing; use the audit columns and null summaries in the Sweetviz report or your own QC.
|
|
|
|
| 146 |
- **Survivorship and sample bias** follow the upstream universe and filters.
|
| 147 |
- **Non-stationarity:** financial regimes change; test generalization across time and sectors.
|
| 148 |
|
|
@@ -158,7 +189,7 @@ If you use this dataset, cite the **upstream transcript dataset** as its authors
|
|
| 158 |
author = {YOUR NAME OR ORG},
|
| 159 |
year = {2026},
|
| 160 |
howpublished = {\url{https://huggingface.co/datasets/RudrakshNanavaty/earnings-call-data}},
|
| 161 |
-
note = {Augments Bose345/sp500\_earnings\_transcripts (2005--2025); adds yfinance
|
| 162 |
}
|
| 163 |
```
|
| 164 |
|
|
|
|
| 10 |
- parquet
|
| 11 |
- reinforcement-learning
|
| 12 |
- sp500
|
| 13 |
+
- xbrl
|
| 14 |
+
- fundamentals
|
| 15 |
size_categories:
|
| 16 |
- 10K-100K
|
| 17 |
task_categories:
|
|
|
|
| 26 |
|
| 27 |
# S&P 500 earnings episodes (2005–2025)
|
| 28 |
|
| 29 |
+
**Augmented release** built on [`Bose345/sp500_earnings_transcripts`](https://huggingface.co/datasets/Bose345/sp500_earnings_transcripts) (same transcript calendar span as that collection: **2005–2025**). Static tabular data for supervised learning or RL-style experiments on **earnings-call episodes**. Each row is one company–quarter call, keyed by a stable `episode_id`, with long-form text (full earnings transcript, SEC press materials), pre-earnings price context, OHLCV anchors, **SEC XBRL fundamentals** (`xbrl_*` columns), and **post-earnings return labels**.
|
| 30 |
|
| 31 |
**Companion report:** **`sweetviz_episodes.html`** — a **Sweetviz** profile of `episodes.parquet`, shipped in this dataset repo. [View on the Hub](https://huggingface.co/datasets/RudrakshNanavaty/earnings-call-data/blob/main/sweetviz_episodes.html) or download the [raw file](https://huggingface.co/datasets/RudrakshNanavaty/earnings-call-data/resolve/main/sweetviz_episodes.html) and open it locally in a browser (distributions, missingness, associations).
|
| 32 |
|
|
|
|
| 34 |
|
| 35 |
## What’s in this folder
|
| 36 |
|
| 37 |
+
These files are the **materialized outputs** of the build pipeline (upstream Hugging Face transcripts → Yahoo Finance prices → SEC EDGAR 8-K press text → feature engineering → merge → optional XBRL join). Intermediate download caches usually live under `data/cache/` locally and are **not** required for analysis if you only use the parquet files below.
|
| 38 |
|
| 39 |
| File | Role |
|
| 40 |
|------|------|
|
| 41 |
+
| **`episodes.parquet`** | **Primary dataset** — one row per episode with identity, text, features, OHLCV anchors, **SEC XBRL fundamentals** (`xbrl_*`), and labels (see [Schema](#schema-episodesparquet)). |
|
| 42 |
+
| **`episodes_press_release_8k.parquet`** | **Subset** of `episodes.parquet`: only rows where `press_release_8k_body` is not null (same schema; fewer rows — on the order of **~16k** after a full pipeline run). [Browse on the Hub](https://huggingface.co/datasets/RudrakshNanavaty/earnings-call-data/blob/main/episodes_press_release_8k.parquet). Produced locally with `uv run python pipeline/filter_episodes_press_release_8k.py`. |
|
| 43 |
| **`sweetviz_episodes.html`** | **Exploratory HTML report** (Sweetviz) for `episodes.parquet`; same folder on the Hub as the parquet files ([see below](#sweetviz-html)). |
|
| 44 |
| `raw_hf.parquet` | Base transcript metadata and structured content source fields from the upstream Hugging Face dataset (see [Provenance](#provenance)). |
|
| 45 |
| `raw_prices.parquet` | Per-episode OHLCV anchors, sector, and price-derived fields from market data. |
|
| 46 |
| `raw_press_releases.parquet` | SEC 8-K body and exhibit text (e.g. EX-99.1 / EX-99.2) aligned to each episode. |
|
| 47 |
| `features.parquet` | Formatted earnings transcript, text flags, momentum/volume features, and label columns produced in the feature stage. |
|
| 48 |
|
| 49 |
+
Rough scale (after a full pipeline run): on the order of **~33k rows** in `episodes.parquet` and **~16k rows** in `episodes_press_release_8k.parquet`, and **hundreds of tickers** (in line with upstream transcript coverage), **2005–2025** span — confirm row and symbol counts on your copy with `len(pd.read_parquet("episodes.parquet"))` and `ep["symbol"].nunique()`.
|
| 50 |
|
| 51 |
---
|
| 52 |
|
|
|
|
| 68 |
|
| 69 |
**Audit / quality:** `next_qtr_date`
|
| 70 |
|
| 71 |
+
**XBRL (SEC EDGAR companyfacts, 2009+):** Per-episode numeric facts from the SEC **company facts** JSON API (`data.sec.gov/api/xbrl/companyfacts/CIK{cik}.json`), documented under [SEC EDGAR APIs](https://www.sec.gov/edgar/sec-api-documentation). Facts use **`us-gaap`** concepts only. Episodes with **`year < 2009`** have nulls in all `xbrl_*` columns (no companyfacts match is attempted for those rows).
|
| 72 |
+
|
| 73 |
+
**How it is joined:** each episode’s ticker maps to a **CIK** via the same SEC ticker map used elsewhere in the pipeline (`data/cache/edgar/cik_map.json`, built during EDGAR steps or with `uv run python pipeline/build_cik_map.py`). If no CIK is found, companyfacts are not fetched for that row. After the merged table exists, run:
|
| 74 |
+
|
| 75 |
+
`uv run python pipeline/06_xbrl.py`
|
| 76 |
+
|
| 77 |
+
That step fills `xbrl_*` on **`episodes.parquet`** and refreshes **`episodes_press_release_8k.parquet`** with the same columns. Requests respect SEC rate limits (under 10 requests per second). When you run the pipeline locally, gaps and reasons are appended to **`reports/failures_xbrl.csv`** (not required to use the Hub parquet).
|
| 78 |
+
|
| 79 |
+
**Matching logic:** each metric tries **several GAAP local names in priority order** (e.g. revenue tries `Revenues`, then revenue-from-contract variants, then net sales) so more cells populate despite issuer tag choice; see `pipeline/06_xbrl.py` for the exact chains.
|
| 80 |
+
|
| 81 |
+
**Provenance (string):** for each value column there is a sibling `*_tag` column (e.g. `xbrl_revenue_tag`) with the **winning** local GAAP name, or null if the value is null.
|
| 82 |
+
|
| 83 |
+
- **Income statement:** `xbrl_revenue`, `xbrl_cost_of_revenue`, `xbrl_gross_profit`, `xbrl_operating_income`, `xbrl_net_income`, `xbrl_eps_basic`, `xbrl_eps_diluted` — plus `xbrl_revenue_tag`, …, `xbrl_eps_diluted_tag`
|
| 84 |
+
- **Balance sheet:** `xbrl_cash_and_cash_equivalents`, `xbrl_total_assets`, `xbrl_total_liabilities` — plus `xbrl_cash_and_cash_equivalents_tag`, `xbrl_total_assets_tag`, `xbrl_total_liabilities_tag`
|
| 85 |
+
- **Cash flow:** `xbrl_net_cash_operating_activities`, `xbrl_capital_expenditures` — plus `xbrl_net_cash_operating_activities_tag`, `xbrl_capital_expenditures_tag`
|
| 86 |
+
|
| 87 |
+
Treat these fields as **best-effort fundamentals aligned to the earnings quarter**, not audited restatements; expect **sparse cells** where filings, tags, or timing do not yield a match.
|
| 88 |
+
|
| 89 |
`sentiment_label` is derived from `move_1d` using fixed percentage bands (very bearish through very bullish). Treat labels as **historical hindsight** for research, not investment advice.
|
| 90 |
|
| 91 |
---
|
|
|
|
| 126 |
- **Transcripts / call metadata:** same underlying universe and years as [`Bose345/sp500_earnings_transcripts`](https://huggingface.co/datasets/Bose345/sp500_earnings_transcripts) (this release **augments** those transcripts with market, SEC, and label columns; respect that dataset’s license and terms when redistributing derived work).
|
| 127 |
- **Market data:** via [yfinance](https://github.com/ranaroussi/yfinance) (subject to Yahoo / vendor terms of use).
|
| 128 |
- **Filings:** U.S. SEC EDGAR public data (comply with [SEC fair access](https://www.sec.gov/os/accessing-edgar-data) and rate-limiting expectations when re-fetching).
|
| 129 |
+
- **XBRL fundamentals:** derived from SEC **company facts** (same public data policy as above); re-fetch only with a proper [User-Agent](https://www.sec.gov/os/accessing-edgar-data) and polite throughput.
|
| 130 |
|
| 131 |
This package is a **processed merge** for research; it is not an official SEC or exchange product.
|
| 132 |
|
|
|
|
| 141 |
|
| 142 |
ep = pd.read_parquet("episodes.parquet")
|
| 143 |
print(ep.shape, ep.columns[:5].tolist())
|
| 144 |
+
|
| 145 |
+
# Optional: only episodes with SEC 8-K body text populated
|
| 146 |
+
ep_8k = pd.read_parquet("episodes_press_release_8k.parquet")
|
| 147 |
+
print(ep_8k.shape)
|
| 148 |
+
|
| 149 |
+
# Optional: rows with at least headline XBRL (example)
|
| 150 |
+
ep_xbrl = ep.dropna(subset=["xbrl_revenue", "xbrl_net_income"])
|
| 151 |
+
print(ep_xbrl.shape)
|
| 152 |
```
|
| 153 |
|
| 154 |
**Hugging Face `datasets`** (if you upload parquet to a Hub dataset repo)
|
|
|
|
| 164 |
|
| 165 |
## Use cases
|
| 166 |
|
| 167 |
+
- Train or evaluate models on **text + tabular market context** with aligned **forward returns** and optional **reported fundamentals** (`xbrl_*`).
|
| 168 |
- Build **RL environments** where observations include call text and pre-earnings features and rewards depend on realized moves (subject to your own leakage and causality checks).
|
| 169 |
- Reproduce or extend the pipeline using the sibling repository that emits these files.
|
| 170 |
|
|
|
|
| 173 |
## Limitations
|
| 174 |
|
| 175 |
- Rows may contain **nulls** where a source (e.g. a filing or price window) was missing; use the audit columns and null summaries in the Sweetviz report or your own QC.
|
| 176 |
+
- **`xbrl_*` columns are intentionally sparse:** many episodes will have nulls (no CIK, no matching GAAP fact for the quarter, or `year < 2009`). Do not assume complete fundamentals coverage.
|
| 177 |
- **Survivorship and sample bias** follow the upstream universe and filters.
|
| 178 |
- **Non-stationarity:** financial regimes change; test generalization across time and sectors.
|
| 179 |
|
|
|
|
| 189 |
author = {YOUR NAME OR ORG},
|
| 190 |
year = {2026},
|
| 191 |
howpublished = {\url{https://huggingface.co/datasets/RudrakshNanavaty/earnings-call-data}},
|
| 192 |
+
note = {Augments Bose345/sp500\_earnings\_transcripts (2005--2025); adds yfinance, SEC EDGAR-derived fields, and optional SEC XBRL companyfacts (us-gaap) on episodes from 2009+.}
|
| 193 |
}
|
| 194 |
```
|
| 195 |
|