Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1824.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**Quarterly financials can read untagged 6-K income tables.** A bounded recent-filing search skips monthly notices; TSM's earnings release supplies TWD 763,064 million net income. (GH #1824)
16 changes: 11 additions & 5 deletions docs/api/company.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,19 +330,25 @@ if financials:

### get_quarterly_financials()

Get financial statements from the latest 10-Q filing.
Read the latest 10-Q or search recent unamended 6-Ks for quarterly results.

```python
def get_quarterly_financials(self) -> Optional[Financials]
def get_quarterly_financials(self, *, max_6k_filings: int = 10) -> Financials | QuarterlyIncome | None
```

**Returns:** `Financials` object from latest quarterly report
XBRL returns `Financials`. An eligible HTML earnings exhibit returns
`QuarterlyIncome`, with income getters and an income table. The search
examines at most `max_6k_filings` filings from the last 183 days and returns
`None` if no supported quarterly result is available.

**Example:**
```python
from edgar import QuarterlyIncome

quarterly = company.get_quarterly_financials()
if quarterly:
q_income = quarterly.income_statement().to_dataframe()
if quarterly is not None:
income = quarterly if isinstance(quarterly, QuarterlyIncome) else quarterly.income_statement()
q_income = income.to_dataframe()
quarterly_revenue = quarterly.get_revenue()
```

Expand Down
31 changes: 26 additions & 5 deletions docs/guides/financial-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,37 @@ income = quarterly.income_statement()

### Foreign private issuers (6-K)

A foreign private issuer such as TSMC files its annual report on Form 20-F with XBRL, so `get_financials()` works as usual. Its quarterly results arrive on Form 6-K, where the numbers sit in an HTML press release (an EX-99 exhibit) with no XBRL behind it. For those companies `get_quarterly_financials()` returns `None`, because there are no statements to read.
When a company has no 10-Q, `get_quarterly_financials()` checks up to 10
unamended 6-Ks filed in the last 183 days, newest first. Each filing's XBRL
takes priority. An HTML earnings exhibit with identifiable quarterly columns
and explicit units can supply a `QuarterlyIncome` result. A monthly notice
alone cannot. The search limit can be set with `max_6k_filings`.

To get the quarter's figures, read the press release tables with `EarningsRelease`:
```python
from edgar import Company, Financials, QuarterlyIncome

quarterly = Company("TSM").get_quarterly_financials()
if isinstance(quarterly, QuarterlyIncome):
print(quarterly.get_net_income()) # Actual currency units
print(quarterly.to_dataframe(include_unit=True))
print(quarterly.source_url, quarterly.notes)
elif isinstance(quarterly, Financials):
print(quarterly.balance_sheet())
```

The income table preserves the exhibit's period labels. A `period_offset`
of 1 selects the next reported comparison column, which can be a year earlier.
`to_dataframe()` scales monetary amounts to currency units and leaves per-share
values as reported. Generic EPS has no inferred basic or diluted classification.
When no supported filing is found, the method returns `None`.

To inspect a particular historical release and read the amounts in their
original printed scale, use its accession:

```python
from edgar import Company, find
from edgar import find
from edgar.earnings import EarningsRelease

Company("TSM").get_quarterly_financials() # None: TSMC's 6-Ks carry no XBRL

filing = find("0001046179-26-000726") # TSMC's 3Q26 earnings release, filed 2026-10-15
release = EarningsRelease.from_filing(filing)
release.income_statement.dataframe
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/sixk-data-object-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ if six_k.financials:
financials.cash_flow_statement
```

Most earnings data in 6-K filings is in HTML tables inside EX-99.x exhibits, not in XBRL. To read those tables, use `EarningsRelease.from_filing(filing)` from `edgar.earnings`, which returns the press release's income statement and other tables as DataFrames. This is also why `Company.get_quarterly_financials()` returns `None` for most foreign private issuers.
Most earnings data in 6-K filings is in HTML tables inside EX-99.x exhibits, not in XBRL. To read those tables, use `EarningsRelease.from_filing(filing)` from `edgar.earnings`, which returns the press release's income statement and other tables as DataFrames. For the latest quarterly result, `Company.get_quarterly_financials()` also checks recent 6-K earnings exhibits for an income table. See [Financial data](financial-data.md#foreign-private-issuers-6-k) for its return types.

---

Expand Down
12 changes: 12 additions & 0 deletions docs/upgrade/6.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ see [Getting help](6.0.md#getting-help).

---

## Quarterly income from an untagged 6-K

`Company.get_quarterly_financials()` can now return `QuarterlyIncome` for a
recent 6-K with a supported HTML income table. In 6.0 this case returned
`None`. The TSMC exhibit in filing `0001046179-26-000726` reports net income
of NT$763,064 million. Call `result.to_dataframe()` on a `QuarterlyIncome`
to read its income table directly. Callers that need a balance sheet or cash flow statement
should first check `isinstance(result, Financials)`.
See the [6-K example](../guides/financial-data.md#foreign-private-issuers-6-k).

---

## `EntityFiling.acceptance_datetime` is deprecated

**What changed.** The value `Company(...).get_filings()` gives each filing as
Expand Down
3 changes: 2 additions & 1 deletion edgar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"get_entity", "get_icon_from_ticker",
),
"edgar.filesystem": ("is_cloud_storage_enabled", "sync_to_cloud", "use_cloud_storage"),
"edgar._html_financials": ("QuarterlyIncome",),
"edgar.financials": ("Financials", "MultiFinancials"),
"edgar.funds": ("Fund", "FundClass", "FundCompany", "FundSeries", "find_fund", "find_funds"),
"edgar.funds.ncen": ("NCEN_FORMS", "FundCensus"),
Expand Down Expand Up @@ -165,7 +166,7 @@
"ValidationError",

# -- Financial statements ------------------------------------------------
"Financials", "MultiFinancials", "XBRL",
"Financials", "MultiFinancials", "QuarterlyIncome", "XBRL",

# -- Funds ---------------------------------------------------------------
"Fund", "FundCompany", "FundClass", "FundSeries",
Expand Down
Loading