Tradevodata commited on
Commit
5c918b9
·
verified ·
1 Parent(s): 7da5069

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. LICENSE +33 -0
  2. METHODOLOGY.md +95 -0
  3. README.md +62 -0
  4. pit_fundamentals_history.csv +0 -0
LICENSE ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Tradevo Data — free sample licensing
2
+
3
+ DATA (data/ directory): CC0 1.0 Universal
4
+ The dataset files are dedicated to the public domain under CC0 1.0
5
+ (https://creativecommons.org/publicdomain/zero/1.0/). They are derived
6
+ from U.S. SEC EDGAR filings, which are public domain. Use them for
7
+ anything, no attribution required (though a link is appreciated).
8
+
9
+ CODE (everything else, including query_asof.py): MIT License
10
+
11
+ Copyright (c) 2026 Tradevo Technologies Inc.
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+
31
+ Note: the data is provided as-is, without warranty of accuracy or fitness.
32
+ It is not investment advice. Verify against primary SEC filings before
33
+ relying on it.
METHODOLOGY.md ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Tradevo Data — Methodology
2
+
3
+ *Point-in-time US equity fundamentals, built honestly from SEC EDGAR.*
4
+
5
+ A small, honest fundamentals dataset built entirely from free SEC EDGAR filings.
6
+ Every value is stamped with the date it *first became public*, so a backtest can only
7
+ ever use what was actually knowable at each point in time.
8
+
9
+ This document exists because, with data, **transparency is the product.** If you can't
10
+ see how it was built and validated, you can't trust it — so here's exactly how it's built.
11
+
12
+ ---
13
+
14
+ ## Problem 1 — Lookahead bias (the silent backtest killer)
15
+
16
+ A company's fiscal year has a *period end* (e.g. Apple's FY2024 ended **2024-09-28**) but
17
+ the numbers aren't *public* until the 10-K is filed weeks later (Apple's was filed
18
+ **2024-11-01**). A backtest that joins fundamentals on the period-end date is using
19
+ information that didn't exist yet — it's peeking into the future.
20
+
21
+ In this sample, on rows with a reliable filing date, fundamentals became public on
22
+ average **43 days after** the period ended (max 61). That's the future-peek a naive
23
+ join silently grants you on *every data point*. It makes strategies look better in
24
+ testing than they are in life.
25
+
26
+ **Live example, straight from the data:**
27
+
28
+ | As of date | Newest AAPL annual revenue you could *honestly* know | Filed |
29
+ |---|---|---|
30
+ | 2024-10-15 | FY2023 — $383.3B | 2023-11-03 |
31
+ | 2024-11-15 | FY2024 — $391.0B | 2024-11-01 |
32
+
33
+ Same company, one month apart, a different "latest known" number. This dataset encodes
34
+ that; a naive one hands you FY2024 too early.
35
+
36
+ ## Problem 2 — Dirty / inconsistent raw data
37
+
38
+ EDGAR is free but messy: companies tag the same concept under different XBRL labels and
39
+ switch them over time (e.g. revenue under `Revenues` in older years, then
40
+ `RevenueFromContractWithCustomerExcludingAssessedTax`). A naive pull locks onto whichever
41
+ tag it sees first and can return a *stale year* or the *wrong number*. We resolve tags
42
+ to the most recent reporting and validate every row (see below).
43
+
44
+ ---
45
+
46
+ ## How it's built
47
+
48
+ 1. **Source** — SEC EDGAR `companyfacts` API (`data.sec.gov`). Public domain, free, no key.
49
+ 2. **Annual figures** — only `10-K` filings; for flow items (revenue, net income) only
50
+ ~full-year durations (345–385 days) are kept, so quarters and stub periods can't leak in.
51
+ 3. **Tag resolution** — among candidate XBRL tags for each concept, we choose the one whose
52
+ data extends to the *most recent* period (ties broken by priority). This kills the
53
+ stale-tag bug.
54
+ 4. **Point-in-time stamping** — `first_filed` = the *earliest* filing that reported a given
55
+ period. That is the first date the number was knowable. `lag_days` = first_filed − period_end.
56
+ 5. **Restatement detection** — if a later filing revised a period's value by >0.5%, the row is
57
+ marked `restated = True`, and we keep both `original_value` (first knowable) and
58
+ `latest_value` (most recent).
59
+ 6. **QA + reliability** — every row is checked (filing-lag range, value magnitude). Rows whose
60
+ only available filing is a much-later one (common for the oldest years, where the original
61
+ 10-K predates XBRL) are marked `filed_reliable = False` rather than shipped with a
62
+ misleading date.
63
+
64
+ ## Columns
65
+
66
+ | column | meaning |
67
+ |---|---|
68
+ | `ticker`, `cik` | company identity |
69
+ | `concept` | Revenue / NetIncome / OperatingCashFlow / EPSDiluted / DilutedShares / Assets / StockholdersEquity |
70
+ | `xbrl_tag` | the exact SEC tag the value came from (full provenance) |
71
+ | `fiscal_year`, `period_end` | the period the value covers |
72
+ | `first_filed` | date it first became public (the point-in-time stamp) |
73
+ | `lag_days` | first_filed − period_end (the lookahead gap) |
74
+ | `filed_reliable` | True if the original 10-K is in XBRL (trust the date) |
75
+ | `original_value` | value as first reported |
76
+ | `latest_value` | value as most recently reported |
77
+ | `restated` | True if later revised >0.5% |
78
+ | `qa_status` | `clean` or the specific flag raised |
79
+
80
+ ## This sample's coverage
81
+
82
+ - 40 large-cap US companies, 7 concepts (revenue, net income, operating cash flow, diluted EPS, diluted shares, assets, equity), up to 12 fiscal years each
83
+ - 3,212 point-in-time rows; revenue history depth averages 11.7 years
84
+ - 3,152/3,212 rows carry a reliable filing date (mean lag 43.4 days, max 61); 60 oldest-year/edge rows flagged for resolution
85
+ - 187 restatements detected (same-tag revisions >0.5%, including 10-K/A amendments)
86
+
87
+ ## Known limitations (we mark them, we don't hide them)
88
+
89
+ - **Oldest-year filing dates**: 60 rows where only a later XBRL filing exists; flagged, not faked.
90
+ (Resolvable by cross-referencing the EDGAR submissions index — on the roadmap.)
91
+ - **Annual only** for now; quarterly (10-Q) point-in-time is the next build.
92
+ - **Banks/insurers**: "revenue" is an approximate concept for financials; treat JPM-type names with care.
93
+ - **40-company sample**: the full US universe is a pipeline run away — gated on demand, not on capability.
94
+
95
+ The entire pitch is the line above each of these: a clean dataset *tells you what it doesn't know.*
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc0-1.0
3
+ language:
4
+ - en
5
+ pretty_name: Point-in-Time US Equity Fundamentals (Sample)
6
+ tags:
7
+ - finance
8
+ - stocks
9
+ - fundamentals
10
+ - backtesting
11
+ - sec-edgar
12
+ size_categories:
13
+ - 1K<n<10K
14
+ task_categories:
15
+ - tabular-regression
16
+ configs:
17
+ - config_name: default
18
+ data_files: pit_fundamentals_history.csv
19
+ ---
20
+
21
+ # Point-in-Time US Equity Fundamentals (Sample)
22
+
23
+ A free, verifiable sample of **point-in-time** US equity fundamentals from SEC EDGAR — 40 large-cap companies, 3,212 annual rows. Every value is stamped with the date it *first became public*, so a backtest only ever sees what was knowable at the time. **No lookahead bias.**
24
+
25
+ This is the open sample of [Tradevo Data](https://tradevodata.com); the full API covers 5,214 companies.
26
+
27
+ ## Why point-in-time matters
28
+
29
+ Most fundamentals datasets store one row per fiscal period keyed by the *period-end* date, and silently overwrite numbers when companies restate. Joining on period-end hands your backtest data months before it was public; using restated values lets it "see" corrections that didn't exist yet. Both quietly inflate returns. This dataset fixes both, by keeping the original first-reported value and its filing date.
30
+
31
+ ## Columns
32
+
33
+ | column | meaning |
34
+ |---|---|
35
+ | `ticker` | US stock symbol |
36
+ | `cik` | SEC Central Index Key |
37
+ | `concept` | one of: Revenue, NetIncome, Assets, StockholdersEquity, OperatingCashFlow, EPSDiluted, DilutedShares |
38
+ | `xbrl_tag` | the exact XBRL tag the value came from |
39
+ | `fiscal_year` | issuer fiscal year |
40
+ | `period_end` | fiscal period end date |
41
+ | `first_filed` | **the date this value first became public** (the point-in-time key) |
42
+ | `lag_days` | days between `period_end` and `first_filed` |
43
+ | `filed_reliable` | whether the filing date is high-confidence |
44
+ | `original_value` | value **as first reported** — use this for point-in-time backtests |
45
+ | `latest_value` | most recent revised value (may post-date `first_filed`) |
46
+ | `restated` | true if later amended by more than 0.5% |
47
+ | `qa_status` | per-row quality verdict (`clean` or `FLAG:…`) |
48
+
49
+ ## Usage
50
+
51
+ ```python
52
+ from datasets import load_dataset
53
+ ds = load_dataset("Tradevodata/point-in-time-us-equity-fundamentals-sample")
54
+ ```
55
+
56
+ For point-in-time correctness, filter to `first_filed <= your_as_of_date` and use `original_value`.
57
+
58
+ ## Provenance & license
59
+
60
+ Source: U.S. SEC EDGAR (public domain). Data is CC0-1.0. See `METHODOLOGY.md` for exactly how it was built. Not investment advice; verify against primary filings before relying on it.
61
+
62
+ Full dataset + JSON API with `as_of` queries: **[tradevodata.com](https://tradevodata.com)** · methodology + code: **[github.com/christianpichichero-max/pit-fundamentals](https://github.com/christianpichichero-max/pit-fundamentals)**
pit_fundamentals_history.csv ADDED
The diff for this file is too large to render. See raw diff