fix(sec_edgar): find capital expenditure reported as productive assets (#1370)

- Capital Expenditure also reads PaymentsToAcquireProductiveAssets, after the property and equipment tag
This commit is contained in:
David Arias, CFA
2026-09-23 12:28:52 -07:00
committed by GitHub
parent 2d17df8da1
commit c78fa86500
3 changed files with 19 additions and 1 deletions
+6
View File
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Breaking changes within the 0.x line are called out explicitly.
## [Unreleased]
### Fixed
- SEC EDGAR cash flow statements find capital expenditure for filers that moved it to purchases of productive assets (NVIDIA since fiscal 2022, Amazon since 2016), whose recent periods read as empty.
## [0.5.0] — 2026-09-18
Point-in-time integrity across every dated path, decisions that are recorded as
+11
View File
@@ -237,3 +237,14 @@ def test_an_uninstalled_checkout_still_identifies_itself(monkeypatch):
monkeypatch.setattr(sec_edgar.metadata, "version", _missing)
assert "@" in sec_edgar._user_agent()
@pytest.mark.unit
def test_capital_expenditure_is_found_under_either_tag_filers_use(monkeypatch):
"""NVIDIA and Amazon report purchases of productive assets, not of property and equipment."""
facts = {"facts": {"us-gaap": {"PaymentsToAcquireProductiveAssets": {"units": {"USD": [
_fact("2024-12-31", 70_000_000, "2025-02-10", start="2024-01-01")]}}}}}
monkeypatch.setattr(sec_edgar, "_fetch_json",
lambda url: TICKER_MAP if "company_tickers" in url else facts)
out = sec_edgar.get_cashflow("AAPL", "annual", "2025-03-01")
assert [r for r in out.splitlines() if r.startswith("Capital Expenditure")] == ["Capital Expenditure,70"]
+2 -1
View File
@@ -66,7 +66,8 @@ _STATEMENTS: dict[str, list[tuple[str, tuple[str, ...]]]] = {
"NetCashProvidedByUsedInOperatingActivitiesContinuingOperations")),
("Investing Cash Flow", ("NetCashProvidedByUsedInInvestingActivities",)),
("Financing Cash Flow", ("NetCashProvidedByUsedInFinancingActivities",)),
("Capital Expenditure", ("PaymentsToAcquirePropertyPlantAndEquipment",)),
("Capital Expenditure", ("PaymentsToAcquirePropertyPlantAndEquipment",
"PaymentsToAcquireProductiveAssets")),
],
}