[BUG] Cash flow statement items appearing as unmapped #25

Open
opened 2026-03-15 17:04:09 +00:00 by Francy51 · 1 comment
Owner

Description

Many cash flow statement line items are appearing in the unmapped section rather than being properly categorized under Operating, Investing, or Financing activities.

Current Template Coverage

From lib/server/financials/standard-template.ts:1030-1471, the cash flow template includes:

Operating Activities (category: 'operating')

  • net_income, depreciation_and_amortization, stock_based_compensation
  • other_adjustments, changes_trade_receivables, changes_inventories
  • changes_accounts_payable, changes_accrued_expenses
  • changes_income_taxes_payable, changes_unearned_revenue
  • changes_other_operating_activities, operating_cash_flow

Investing Activities (category: 'investing')

  • capital_expenditures, acquisitions, investments
  • proceeds_from_sale_of_property_plant_and_equipment
  • other_investing_activities, investing_cash_flow

Financing Activities (category: 'financing')

  • short_term_debt_issued, long_term_debt_issued, debt_repaid
  • share_repurchases, dividends_paid
  • other_financing_activities, financing_cash_flow

Calculated (category: 'free_cash_flow')

  • free_cash_flow

Problem

Despite comprehensive template definitions, many cash flow items may be unmapped because:

  1. XBRL cash flow concept names vary significantly between filers
  2. Some concepts use different naming conventions (e.g., "ProceedsFrom..." vs "CashReceivedFrom...")
  3. Indirect method vs direct method cash flows use different concepts
  4. Some companies report cash flows with different level of granularity

Common Unmapped Concepts to Investigate

  • NetCashProvidedByUsedInOperatingActivitiesDiscontinuedOperations
  • CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents
  • Various "PaymentsTo..." and "ProceedsFrom..." variants
  • Exchange rate effect on cash

Proposed Fix

  1. Add additional XBRL concept names to cash flow matchers
  2. Add fallback formulas for computed cash flow items
  3. Review SEC filings to identify commonly used but unmapped cash flow concepts
  4. Add more specific "allowedLabelPhrases" for cash flow matching

Files Affected

  • lib/server/financials/standard-template.ts
  • lib/server/financials/surface.ts
## Description Many cash flow statement line items are appearing in the unmapped section rather than being properly categorized under Operating, Investing, or Financing activities. ## Current Template Coverage From `lib/server/financials/standard-template.ts:1030-1471`, the cash flow template includes: ### Operating Activities (category: 'operating') - net_income, depreciation_and_amortization, stock_based_compensation - other_adjustments, changes_trade_receivables, changes_inventories - changes_accounts_payable, changes_accrued_expenses - changes_income_taxes_payable, changes_unearned_revenue - changes_other_operating_activities, operating_cash_flow ### Investing Activities (category: 'investing') - capital_expenditures, acquisitions, investments - proceeds_from_sale_of_property_plant_and_equipment - other_investing_activities, investing_cash_flow ### Financing Activities (category: 'financing') - short_term_debt_issued, long_term_debt_issued, debt_repaid - share_repurchases, dividends_paid - other_financing_activities, financing_cash_flow ### Calculated (category: 'free_cash_flow') - free_cash_flow ## Problem Despite comprehensive template definitions, many cash flow items may be unmapped because: 1. XBRL cash flow concept names vary significantly between filers 2. Some concepts use different naming conventions (e.g., "ProceedsFrom..." vs "CashReceivedFrom...") 3. Indirect method vs direct method cash flows use different concepts 4. Some companies report cash flows with different level of granularity ## Common Unmapped Concepts to Investigate - `NetCashProvidedByUsedInOperatingActivitiesDiscontinuedOperations` - `CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents` - Various "PaymentsTo..." and "ProceedsFrom..." variants - Exchange rate effect on cash ## Proposed Fix 1. Add additional XBRL concept names to cash flow matchers 2. Add fallback formulas for computed cash flow items 3. Review SEC filings to identify commonly used but unmapped cash flow concepts 4. Add more specific "allowedLabelPhrases" for cash flow matching ## Files Affected - `lib/server/financials/standard-template.ts` - `lib/server/financials/surface.ts`
Author
Owner

Update: Root Cause Analysis

The Rust sidecar IS being used. Cash flow definitions ARE in rust/taxonomy/fiscal/v1/core.surface.json (lines 883-1527).

Current Coverage:

The cash flow section in core.surface.json includes comprehensive definitions:

Operating Activities (category: "operating"):

  • net_income, depreciation_and_amortization, stock_based_compensation
  • other_adjustments, changes_trade_receivables, changes_inventories
  • changes_accounts_payable, changes_accrued_expenses
  • changes_income_taxes_payable, changes_unearned_revenue
  • changes_other_operating_activities, operating_cash_flow

Investing Activities (category: "investing"):

  • capital_expenditures, acquisitions, investments
  • proceeds_from_sale_of_property_plant_and_equipment
  • other_investing_activities, investing_cash_flow

Financing Activities (category: "financing"):

  • short_term_debt_issued, long_term_debt_issued, debt_repaid
  • share_repurchases, dividends_paid
  • other_financing_activities, financing_cash_flow

Free Cash Flow (category: "free_cash_flow"):

  • free_cash_flow (formula_only: operating_cash_flow + capital_expenditures)

Why Items May Be Unmapped:

  1. XBRL concept name variations - Different filers use different concept names
  2. Missing allowed_source_concepts - The JSON may not include all variants
  3. Extension concepts - Company-specific extensions won't match

Common Unmapped Concepts to Add:

Based on SEC filing patterns, these concepts should be added to allowed_source_concepts:

Operating:
- NetCashProvidedByUsedInOperatingActivitiesDiscontinuedOperations
- IncreaseDecreaseInOtherReceivables
- IncreaseDecreaseInOtherCurrentAssets
- IncreaseDecreaseInPrepaidExpensesAndOtherAssets

Investing:
- PaymentsToAcquireInvestments
- ProceedsFromSaleOfInvestments
- PaymentsToAcquireOtherAssets
- ProceedsFromSaleOfOtherAssets

Financing:
- ProceedsFromIssuanceOfCommonStock
- ProceedsFromExerciseOfStockOptions
- PaymentsForRepurchaseOfPreferredStock
- ProceedsFromIssuanceOfPreferredStock

Fix Required:

  1. Expand allowed_source_concepts arrays in core.surface.json for cash flow items
  2. Review SEC filings to identify commonly used but unmapped cash flow concepts
  3. Add wildcard/pattern matching in Rust for "PaymentsTo..." and "ProceedsFrom..." patterns

Files to Update:

  • rust/taxonomy/fiscal/v1/core.surface.json - Add missing concepts
  • rust/fiscal-xbrl-core/src/surface_mapper.rs - Consider pattern matching
## Update: Root Cause Analysis **The Rust sidecar IS being used.** Cash flow definitions ARE in `rust/taxonomy/fiscal/v1/core.surface.json` (lines 883-1527). ### Current Coverage: The cash flow section in `core.surface.json` includes comprehensive definitions: **Operating Activities** (category: "operating"): - net_income, depreciation_and_amortization, stock_based_compensation - other_adjustments, changes_trade_receivables, changes_inventories - changes_accounts_payable, changes_accrued_expenses - changes_income_taxes_payable, changes_unearned_revenue - changes_other_operating_activities, operating_cash_flow **Investing Activities** (category: "investing"): - capital_expenditures, acquisitions, investments - proceeds_from_sale_of_property_plant_and_equipment - other_investing_activities, investing_cash_flow **Financing Activities** (category: "financing"): - short_term_debt_issued, long_term_debt_issued, debt_repaid - share_repurchases, dividends_paid - other_financing_activities, financing_cash_flow **Free Cash Flow** (category: "free_cash_flow"): - free_cash_flow (formula_only: operating_cash_flow + capital_expenditures) ### Why Items May Be Unmapped: 1. **XBRL concept name variations** - Different filers use different concept names 2. **Missing allowed_source_concepts** - The JSON may not include all variants 3. **Extension concepts** - Company-specific extensions won't match ### Common Unmapped Concepts to Add: Based on SEC filing patterns, these concepts should be added to `allowed_source_concepts`: ``` Operating: - NetCashProvidedByUsedInOperatingActivitiesDiscontinuedOperations - IncreaseDecreaseInOtherReceivables - IncreaseDecreaseInOtherCurrentAssets - IncreaseDecreaseInPrepaidExpensesAndOtherAssets Investing: - PaymentsToAcquireInvestments - ProceedsFromSaleOfInvestments - PaymentsToAcquireOtherAssets - ProceedsFromSaleOfOtherAssets Financing: - ProceedsFromIssuanceOfCommonStock - ProceedsFromExerciseOfStockOptions - PaymentsForRepurchaseOfPreferredStock - ProceedsFromIssuanceOfPreferredStock ``` ### Fix Required: 1. Expand `allowed_source_concepts` arrays in `core.surface.json` for cash flow items 2. Review SEC filings to identify commonly used but unmapped cash flow concepts 3. Add wildcard/pattern matching in Rust for "PaymentsTo..." and "ProceedsFrom..." patterns ### Files to Update: - `rust/taxonomy/fiscal/v1/core.surface.json` - Add missing concepts - `rust/fiscal-xbrl-core/src/surface_mapper.rs` - Consider pattern matching
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Francy51/Neon-Desk#25