Skip to content
Merged
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
19 changes: 19 additions & 0 deletions docs/guides/financial-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,25 @@ income = quarterly.income_statement()
| Annual (10-K) | `company.get_financials()` |
| Quarterly (10-Q) | `company.get_quarterly_financials()` |

### 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.

To get the quarter's figures, read the press release tables with `EarningsRelease`:

```python
from edgar import Company, 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
```

Net income for 3Q26 comes back as 763,064 against 452,302 a year earlier. The amounts are as printed in the release, which states its unit as "NT$ million", so check that note before comparing them with XBRL figures. To find the earnings releases among a company's 6-Ks, see the [6-K guide](sixk-data-object-guide.md).

---


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. If you need structured financial data from a 6-K, parse the press release exhibits directly.
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.

---

Expand Down
4 changes: 4 additions & 0 deletions edgar/entity/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,10 @@ def get_quarterly_financials(self) -> Optional[Financials]:
XBRL (most 6-Ks don't). It is never how a failure is reported; a
transport or parsing failure raises.

A 6-K filer's quarterly figures are usually in an HTML press
release instead; read them with
``edgar.earnings.EarningsRelease.from_filing(filing)``.

Example::

quarterly = Company("AAPL").get_quarterly_financials()
Expand Down
13,933 changes: 13,933 additions & 0 deletions tests/cassettes/test_documented_6k_quarterly_example.yaml

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions tests/issues/regression/test_issue_1824_6k_quarterly_docs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"""get_quarterly_financials() returns None for TSM, and the docs did not say why.

GitHub Issue: https://github.com/dgunning/edgartools/issues/1824

TSMC files its quarterly results on Form 6-K as an HTML press release (EX-99)
with no XBRL, so ``get_quarterly_financials()`` has no statements to read and
returns ``None``, which is the 6.0 contract (docs/upgrade/6.0.md). The guide now
says so and points to ``EarningsRelease``. This runs the documented example as
written in docs/guides/financial-data.md.

Ground truth: TSMC 6-K 0001046179-26-000726 (filed 2026-10-15), exhibit
a3q26e_withguidancexfinal.htm, unit "NT$ million": 3Q26 net income 763,064
and 3Q25 net income 452,302.
"""
import pytest

from edgar import Company, find
from edgar.earnings import EarningsRelease
from tests.paths import REPO_ROOT


@pytest.mark.vcr
def test_documented_6k_quarterly_example():
assert Company("TSM").get_quarterly_financials() is None

filing = find("0001046179-26-000726")
release = EarningsRelease.from_filing(filing)
df = release.income_statement.dataframe

net_income = df.loc["Net income"]
assert net_income.iloc[0] == 763064
assert net_income.iloc[1] == 452302


def test_guide_shows_the_example_this_test_runs():
guide = (REPO_ROOT / "docs" / "guides" / "financial-data.md").read_text(encoding="utf-8")

assert 'find("0001046179-26-000726")' in guide
assert "EarningsRelease.from_filing(filing)" in guide
assert "763,064" in guide
Loading