Skip to content

v5.3.2: Critical parent_concept Data Accuracy Fix

Choose a tag to compare

@dgunning dgunning released this 17 Dec 14:21
· 1621 commits to main since this release

Critical Data Accuracy Fix

This is a critical patch release fixing a data accuracy bug in financial statement metadata.

Fixed

parent_concept Column Missing Values Due to Dictionary Key Collision (#542)

  • Fixed critical bug where parent_concept showed None for 85%+ of financial statement concepts that should have parent values
  • Root Cause: Dictionary key collision in _add_metadata_columns() when the same concept appeared multiple times (main item + dimensional breakdowns)
  • Dimensional items (Products, Services, geographic regions) were overwriting main line items, losing parent hierarchy information
  • Solution: Changed from last-occurrence dictionary comprehension to explicit first-occurrence loop to preserve parent metadata
  • Impact: parent_concept population rate improved from ~14% to 72% for dimensional data
  • Example: Revenue parent_concept now correctly shows 'us-gaap_GrossProfit' instead of None

Affected Users: Anyone analyzing financial statement hierarchies or parent-child relationships, especially for companies with dimensional data (product/geographic segments).

Files Changed: edgar/xbrl/statements.py
Testing: New regression test test_issue_542_parent_concept_dimensional.py verifies fix
Beads Issue: edgartools-0468

Summary

Release 5.3.2 is a critical patch release that fixes a data accuracy bug in financial statement parent_concept metadata. The fix ensures correct hierarchy information is preserved for concepts that appear multiple times (main item + dimensional breakdowns), improving metadata population rate from 14% to 72%.

This release maintains full backward compatibility with v5.3.1.

Installation

pip install --upgrade edgartools

Credits

Special thanks to @Velikolay (Nikolay Ivanov) for the high-quality bug report with detailed analysis.


Full Changelog: v5.3.1...v5.3.2