Skip to content

Fix EntityFacts operating cash flow fallback - #1989

Open
joshhheo wants to merge 1 commit into
dgunning:mainfrom
joshhheo:cash-flow-fallback
Open

joshhheo wants to merge 1 commit into
dgunning:mainfrom
joshhheo:cash-flow-fallback

Conversation

@joshhheo

Copy link
Copy Markdown
Contributor

What this changes

When a company reports operating cash flow separately for continuing and discontinued operations, EntityFacts.get_concept("operating_cash_flow") could return the continuing-operations subtotal as the company-wide total. The lookup now returns None when it selects that subtotal and finds nonzero discontinued operating cash flow for the same reporting period and currency.

Fixes #1987

Verification

  • Ground truth — SIFCO Industries FY2025 Form 10-K, accession 0001628280-25-058405. The filing reports $127,000 from continuing operations and $5,000 from discontinued operations. The regression test uses those amounts and checks that the lookup returns None. A separate check using archived SEC Company Facts asserted that GE still returns its reported FY2023 total of $5.179 billion (10-K accession 0000040545-24-000027).
  • Regression test — tests/issues/regression/test_issue_1987.py links the issue in its docstring. All six cases passed.
  • Changelog — changelog.d/1987.fixed.md

SIFCO FY2025 10-K · GE FY2023 10-K

AI assistance

  • Assisted with OpenAI Codex (GPT-6).

@joshhheo

Copy link
Copy Markdown
Contributor Author

Could a maintainer rerun test-fast (3.13)? The only failure was test_get_text_from_filing_with_no_body_tag, where filing.html() returned None for a Pear Tree Advisors filing. The six cash-flow regression cases passed locally.

@dgunning dgunning added the guard-scan Maintainer-applied: runs the Agent config guard on this PR label Nov 19, 2026
@joshhheo joshhheo closed this Nov 19, 2026
@joshhheo joshhheo reopened this Nov 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

guard-scan Maintainer-applied: runs the Agent config guard on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EntityFacts returns continuing-operations cash flow as total operating cash flow

2 participants