Skip to content

[Hotfix] - Fix SEC statement normalization - #7637

Open
russlan23 wants to merge 1 commit into
OpenBB-finance:developfrom
russlan23:hotfix/sec-standardized-statements
Open

[Hotfix] - Fix SEC statement normalization#7637
russlan23 wants to merge 1 commit into
OpenBB-finance:developfrom
russlan23:hotfix/sec-standardized-statements

Conversation

@russlan23

Copy link
Copy Markdown

Why?

Fixes #7634. SEC standardized statements were missing several current-debt XBRL spellings, and the hierarchical rollup could infer operating income from revenue alone, producing a misleading 100% operating margin.

What?

  • Maps NotesAndLoansPayable and OtherShortTermBorrowings to short-term debt across all statement profiles.
  • Maps three current-maturity debt tags to current portion of long-term debt across all profiles.
  • Removes the duplicate generic-payables mapping for OtherShortTermBorrowings where present.
  • Prevents operating income rollup unless at least two contributing children are available.
  • Adds focused schema and imputation regression tests.

Impact

Current debt is classified consistently across industrial, financial, diversified, and insurance statements. Missing operating expenses no longer cause revenue to be presented as operating income.

Testing Done

  • pytest -q openbb_platform/providers/sec/tests/test_company_facts.py -k 'current_debt_tag_mappings or operating_income_not_rolled_up_from_single_child' --tb=short --disable-warnings (5 passed)
  • pytest -q openbb_platform/providers/sec/tests/test_company_facts.py -k 'TestBLKIncomeStatement' --tb=short --disable-warnings (15 passed)
  • git diff --check
  • JSON syntax validation with jq empty

Reviewer Notes

The operating-income guard is deliberately limited to total_operating_income; other parent rows retain the existing generic rollup behavior.

@CLAassistant

CLAassistant commented Aug 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@russlan23
russlan23 marked this pull request as ready for review August 11, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] SEC standardized statements: missing debt tag mappings, and operating income imputed as revenue

2 participants