edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

Balance_sheet missing cash and cash equivalents for IESC

Open miruddfan opened this issue 11 months ago • 3 comments

Issue Type

  • [ x] Data Quality Issue (incorrect financial values, missing data)
  • [ ] XBRL Parsing Issue (statement rendering, concept mapping)
  • [ ] Filing Access Issue (download failures, attachment problems)
  • [ ] Performance Issue (slow operations, memory problems)
  • [ ] Compatibility Issue (platform/dependency conflicts)
  • [ ] Documentation Issue (unclear instructions, missing examples)

Environment

EdgarTools Version: 5.7.1 Python Version:3.10.19
Operating System:Win11

Bug Description

What you expected to happen: I expected to pull the balance sheet values for Cash or Cash and Cash Equivalents.

What actually happened: financials.balance_sheet() skips the Cash line for the balance sheet of IESC

Error message (if any):

No error message

Reproduction

Company/Ticker: IESC Time Period: 2025 Relevant Forms:10-k Balance Sheet

Minimal code to reproduce:

company_ticker = "IESC"  # Example: Apple Inc.

company = Company(company_ticker)
financials = company.get_financials()

balance_sheet = financials.balance_sheet()

## Additional Context

I have only reviewed ~ 40 stocks.  This the only instance - so far - where the package skips this line.

---
*This issue will be handled using EdgarTools' systematic issue resolution workflow. A reproduction test will be created to verify the fix.*

miruddfan avatar Jan 02 '26 20:01 miruddfan

Thank you for the detailed bug report!

We've confirmed this as a critical data accuracy bug requiring immediate point release v5.7.3.

Issue Confirmed ✅

You're absolutely right - Cash and Cash Equivalents appears at the wrong position in the IESC balance sheet:

Position 39 (LAST):  "Cash and Cash Equivalent"
Expected Position:   1-2 (FIRST under Current Assets)

The correct order should be:

  1. Current Assets section starts
  2. Cash and Cash Equivalents ← Should be here
  3. Accounts Receivable
  4. Inventory ...
  5. Total Liabilities and Stockholders' Equity

But currently shows: ... 37. Total Stockholders' Equity 38. Total Liabilities and Stockholders' Equity 39. Cash and Cash Equivalents ← Currently here (WRONG!)

Classification

Priority: P0 CRITICAL
Type: Data Accuracy Issue
Beads Issue: edgartools-8bhv
Target Release: v5.7.3 (point release)
Timeline: 4-24 hours

This is the third instance of balance sheet presentation issues after v5.7.0's dimension filtering changes:

  • Issue #568: APD missing line items
  • Issue #569: Dimension filtering improvements
  • Issue #575: IESC Cash in wrong position ← Your report

Root Cause

This appears to be a presentation order bug where Cash is being sorted incorrectly in the statement rendering logic. We're investigating why it's appearing after the final balance sheet total instead of at the beginning.

Next Steps

  1. ⏳ Investigate XBRL presentation linkbase for IESC 10-K
  2. ⏳ Identify root cause of incorrect positioning
  3. ⏳ Fix + regression test
  4. ⏳ Release v5.7.3 (point release within 24 hours)

Thank you for your diligent testing across 40+ stocks - reports like this are invaluable for maintaining data accuracy! We'll update this issue as we progress.


Tracking: edgartools-8bhv

dgunning avatar Jan 02 '26 20:01 dgunning

@dgunning Actually, since switching to 5.7.1, I found the balance_sheet.to_dataframe() for URI is moving PPE to the top of the dataframe, all values are blank. balance_sheet = financials.balance_sheet() seems to have the correct information. I can issue a new bug, but I think this is related.... Let me know.

miruddfan avatar Jan 03 '26 12:01 miruddfan

Fixed in v5.7.3. The balance sheet now correctly orders items so components appear before totals, even for filings with flat presentation linkbases like IESC's 10-K.

Install the update:

pip install --upgrade edgartools

dgunning avatar Jan 03 '26 15:01 dgunning