How this dataset is built
Every step is in recipe/, at the same revision as the data.
What had to be true
An earnings calendar is worth having because of the time of day. A release at 07:00 Eastern trades on the open, one at 16:30 trades overnight, and four hours of error swaps them. Everything below follows from getting that one field right.
Finding the releases: cheap
EDGAR's bulk submissions.zip is a million company files holding 27 205 984
filings, and it scans in 37 seconds. Every 8-K carries its item codes,
which is the only place outside the filings themselves that says which 8-K was
an earnings release. Item 2.02 is "Results of Operations and Financial
Condition"; before the 2004 renumbering the same disclosure was Item 12, and
both are matched.
That yields 454 613 rows for 445 267 distinct filings — the difference is co-registrants, a parent and its subsidiaries announcing in one document. Each company keeps its own row, and the point-in-time event id is the company and the filing together.
Getting the time right: expensive
submissions.zip also carries acceptanceDateTime, with a Z suffix. It is
not reliably UTC. Measured against the filings' own SGML headers on a
stratified sample:
| Filed | Share where the label is Eastern local time |
|---|---|
| 2004–2009 | 44% |
| 2010–2015 | 62% |
| 2016–2020 | 50% |
| 2021–2026 | 6% |
The first attempt was a heuristic: EDGAR accepts filings between 06:00 and 22:00 Eastern, so a timestamp that falls outside that window when read as UTC must be Eastern. It reduced out-of-window timestamps to 0.0% in every era and looked convincing.
It was wrong, and the way it was wrong is worth recording. Checked against headers, the rule scored 10 out of 10 on the timestamps it flagged — and 6 out of 10 on the ones it left alone. A label of 14:10 read as UTC gives 10:10 Eastern, comfortably inside the window, and the substitution is invisible. The heuristic was quietly mis-dating half the corpus while reporting a perfect diagnostic.
So the timestamp comes from each filing's own header, where
ACCEPTANCE-DATETIME is unambiguous Eastern. One ranged request per release —
the header is in the first kilobyte, so the transfer is negligible and the cost
is the request count. 445 267 of them, at SEC's rate limit, is fourteen hours.
Six headers could not be parsed and one filing is gone from EDGAR; those
releases are dropped rather than dated by guess.
The backfill is checkpointed every five thousand, because a laptop going to sleep kills every socket and the first run lost an hour to a connection pool that hung rather than failed.
The check that the answer is right is in the quality gate: releases must cluster outside market hours. They do — 80.6%. If the zone were wrong they would smear across the session, and nothing else in the pipeline would show it.
Which session, and which session could act
The first version used fixed hours: before 09:30 Eastern is pre-market, before 16:00 is the session, after that is the close. It is wrong twice over, and the published data showed both.
On 50 half days in this period the NYSE closes at 13:00, so 37 releases that
arrived after the close were labelled as arriving inside it — 14:19 on the day
after Thanksgiving, 15:14 on Christmas Eve. And on 25 days the exchange held no
session at all while EDGAR kept accepting filings: 303 releases during the two
days Sandy shut the floor, the rest on Good Fridays. A boolean is_trading_day
was true on every one of them, because it was testing for a weekday.
Both now come from the XNYS calendar in exchange_calendars, which knows the
half days and the closures because that is its job. The boolean is gone,
replaced by first_tradeable_session: the first session whose close falls
after the filing was accepted. It answers all three questions a consumer would
otherwise work out for themselves — was this before or after the close, was the
exchange open at all, and what does a 16:30 release on a Friday mean — with one
date. For the Sandy releases the answer is simply 31 October.
Symbols, as of the day and not as of today
The filings identify a company by CIK and nothing in EDGAR says what it traded as, so every consumer has been building that map themselves. The obvious construction — today's ticker for every row — reintroduces exactly the look-ahead the rest of this family exists to remove.
ZipLime/security-master publishes 29 511 dated ticker spans, each bounded by
the days the symbol was actually observed. Resolution here is as of the filing
day, and ticker_confidence records which of three things happened: as_of
when a span covers the day (80.6% of releases), carried_back when the day
precedes every span (12.5%, almost all before EDGAR's symbol data starts in
2006), carried_forward when every span has ended (1.6%). The remaining 5.3%
have no symbol on record and are left null rather than guessed.
Pairing a release with its figures
An 8-K's reportDate is the day of the event, not the period reported. Apple's
release of 30 July 2026 is dated 30 July and reports the quarter that ended in
June; matching on proximity in time would attach every release to the wrong
period for any company whose fiscal year is not the calendar year.
The pairing goes through the statement instead: for each release, the company's 10-Q or 10-K whose period had already closed when the release was made, and which was itself filed afterwards, within 150 days. The median gap is four days.
88.4% of releases from 2011 pair. Earlier the rate collapses, because the figures come from XBRL and XBRL starts in 2009 — so the gate measures the window where pairing is possible at all. A blended rate across all years reads 56.9% and would be a floor on how much of the corpus predates XBRL.
Year-on-year growth is matched on the same fiscal period one year earlier, and the prior figures are taken from the statements rather than from paired releases. That distinction was found by a test: taking them from the paired set dropped the comparison whenever the year-ago release happened not to pair, for no reason a reader could see. Fixing it moved EPS growth coverage from 40% to 65%.
Figures the row itself contradicts
net_income / eps_diluted is the share count a row implies, and it needs
nothing that is not already in the row. Across the 182 536 rows carrying both,
p1 is 2.07 million and the median 56.7 million. 197 rows imply fewer than fifty
thousand shares — Halliburton's fourth quarter of 2023 implies 903 — and every
one of them is a total that was tagged into a per-share field upstream.
Those rows keep their announcement and lose their EPS: eps_diluted and
eps_yoy_change are blanked and eps_quality becomes implausible. Blanking
rather than dropping matters because the timestamp is the product; blanking
rather than ranking matters because a wrong number goes to the top of a sorted
book, not into the middle of it. The same check runs on the year-ago figure,
which poisons a growth rate just as thoroughly.
The root cause is in the concept map of company-fundamentals and has to be
fixed there too. This check is local, costs nothing, and does not wait for it.
SUE, the surprise measure that never needed consensus
Analyst estimates are licensed and do not exist publicly, which the first version of this document treated as the end of the matter. It is not: the post-earnings-announcement-drift literature standardises against the company's own history rather than against a consensus. The surprise is the change from the same period a year earlier; the scale is the standard deviation of that surprise over the eight periods before it.
Two decisions make it point-in-time honest. The window is built from the statements, not from paired releases, so a quarter whose 8-K happened not to pair still counts. And a prior period enters only if its statement had been accepted before this release was made — a company that files late does not get a window containing periods nobody had seen.
Why it matters more than the raw growth already published: revenue_yoy_change
cannot be ranked across companies. A utility growing 3% and a biotech growing
300% are not comparable, and a cross-sectional sort on growth sorts volatility
as much as surprise. sue is dimensionless, and it is what an event study
ranks on.
Dating the events table
events is the largest table here and, as first published, could not be
mounted at all: it carried filed_date and no knowledge date, and the ziplime
convention refuses a config it cannot time rather than risk look-ahead.
Only the earnings releases in it have had their headers read. So the exact
instant is used for those — 23.1% of rows — and every other event is dated to
23:59:59 Eastern on its filing day. That is late by up to a day and never
early, which is the direction a knowledge date may be wrong in.
knowledge_estimated marks which is which.
The same convention decided a smaller thing: announcements and earnings
carry knowledge_date as well, as an alias of the acceptance instant they
already published under announced_at. Verified against the adapter itself --
before the alias it resolved two configs of four, now it resolves all four.
One consequence is visible in the data and is not an error: 63 065 events carry an exact timestamp earlier than their own filing date, because EDGAR stamps anything accepted after 17:30 with the next business day. The quality gate checks estimated dates against their filing day and leaves exact ones alone — the first version of the check did not, and failed the build.
Verification
quality.py gates publication. Beyond nulls and
duplicates:
- releases must land outside market hours at least 60% of the time — the check that the timestamps are in the right zone;
- no release may be labelled
market_hourson a day the exchange held no session, and none may be tradeable before it was filed; - a release must precede the statement it announces, or the pairing walked backwards;
- no surviving EPS may imply fewer than fifty thousand shares;
- every event must carry a knowledge date, and an estimated one must fall on its filing day;
- no point-in-time row may be known before the period it reports;
- ticker coverage must stay above 70%, which is how a failure to load the security master would announce itself.
What is not done
- No consensus estimates.
suestandardises against the company's own history instead. A surprise against what analysts expected is not derivable from public filings at all. - No intraday price reaction. That needs prices, which this family does not redistribute.
- No press-release text. The exhibit carrying the numbers is not parsed; the figures come from the XBRL statement instead, which is structured.
- Bulk timestamps are not used as a fallback. A release whose header could not be read is dropped. Half-verified times are worse than absent ones: they look usable.
- Only the NYSE calendar. A Nasdaq-listed company's release is classified against NYSE sessions. The two calendars differ on almost nothing that matters here, but they are not the same calendar.
- The other tables in this family still carry CIK alone. The as-of ticker
resolution here should be applied to
company-fundamentals,institutional-portfolio-13fandfund-holdings-nport, which have the same problem for the same reason.