What each date tells you

DateMeaningQuestion it answers
Period endThe last day of the quarter or year the number coversWhat was revenue for the quarter ending 30 June?
First-filed dateThe day the number first appeared in an SEC filingWhen could anyone outside the company have known it?
Later filed datesDays the number appeared again, as a comparison or a correctionDid the company ever change it?

The gap between period end and first filing is the reporting lag. SEC rules set the outer limit. A 10-Q is due 40 days after quarter end for large accelerated and accelerated filers and 45 days for other filers, and no 10-Q covers the fourth quarter. A 10-K is due 60 days after year end for large accelerated filers, 75 for accelerated filers and 90 for all others. Companies can file before the deadline, so read each filing's own date.

A real example from SEC data

Apple's Revenues concept on data.sec.gov contains this row:

{
  "start": "2015-09-27",
  "end": "2016-09-24",
  "val": 215639000000,
  "accn": "0000320193-18-000145",
  "fy": 2018,
  "fp": "FY",
  "form": "10-K",
  "filed": "2018-11-05",
  "frame": "CY2016"
}

The start and end fields say the number covers Apple's fiscal year ended 24 September 2016. The filed field says the 10-K carrying this row was filed on 5 November 2018. The fy field reads 2018 because it describes the filing, so a 2016 number sits under a 2018 label. Use start and end for the period, never fy.

The row also hides the true first-filed date. Apple changed revenue tags twice. When you look up the same period in its full company facts file across all three revenue tags, you get this:

FiledTagFormfyValue
2016-10-26SalesRevenueNet10-K2016215,639,000,000
2017-11-03SalesRevenueNet10-K2017215,639,000,000
2018-11-05Revenues10-K2018215,639,000,000

The public first saw this number on 26 October 2016. If you queried only Revenues, you would date it two years late. That error does not leak future data, but it delays every signal built on the number and can make a backtest look worse than it should.

How to get a safe known-from date

  1. Collect every row for the same period (same start and end) across all tags that could hold the item. Companies change tags over time.
  2. Take the smallest filed value. That is the first-filed date.
  3. Treat the number as known from the next trading day. The company facts rows carry a date but no time of day, and a filing that lands after the close was not known at that day's closing price.
  4. Keep the later rows. If a later val differs, the company revised the number (see restatements: original vs latest value).

This script runs against the public SEC endpoint and prints the table above:

import gzip
import json
import urllib.request

HEADERS = {"User-Agent": "Your Name your.email@example.com", "Accept-Encoding": "gzip"}
url = "https://data.sec.gov/api/xbrl/companyfacts/CIK0000320193.json"
req = urllib.request.Request(url, headers=HEADERS)
with urllib.request.urlopen(req, timeout=30) as resp:
    body = resp.read()
    if resp.headers.get("Content-Encoding") == "gzip":
        body = gzip.decompress(body)
gaap = json.loads(body)["facts"]["us-gaap"]

REVENUE_TAGS = [
    "SalesRevenueNet",
    "Revenues",
    "RevenueFromContractWithCustomerExcludingAssessedTax",
]
period = ("2015-09-27", "2016-09-24")  # Apple fiscal 2016

seen = []
for tag in REVENUE_TAGS:
    for row in gaap.get(tag, {}).get("units", {}).get("USD", []):
        if (row.get("start"), row["end"]) == period:
            seen.append((row["filed"], tag, row["form"], row["fy"], row["val"]))

for filed, tag, form, fy, val in sorted(seen):
    print(filed, tag, form, fy, val)

Put your own name and email in the User-Agent before you run it. The SEC asks every automated client to identify itself.

The company facts file holds only standard-taxonomy facts for the whole company. If a company reported a number under its own custom tag, the earliest filing may be missing from this file, and you would need the filing's own XBRL to find it.

For the field-by-field layout of the file, see how to read SEC companyfacts JSON. Younesa is building US company data from SEC filings.