edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

Separate a total from its own parts: component concepts for D&A and SG&A, and a calc-ancestry test that keeps one concept from holding both

Open synfonia-llc opened this issue 1 month ago • 1 comments

Feature Category

  • [x] New API functionality
  • [ ] Performance improvement
  • [x] Developer experience improvement
  • [ ] Documentation enhancement
  • [ ] Tool/utility addition

Problem Statement

Is your feature request related to a problem? Please describe. In 106 standard concepts, one member is a FASB calculation ancestor of another: 2,317 pairs, 84 of them between tags each used by 500+ companies (Revenue: Revenues and contract revenue; CostOfGoodsAndServicesSold; SellingGeneralAndAdminExpenses; InterestExpense; TradePayables; NetChangeInCash including and excluding the exchange-rate effect). A standardized statement then shows a total and its own part under one concept. Walmart (0000104169-24-000178): Revenues $160.804B and contract revenue $159.439B are both Revenue.

Two families need new concepts to fix:

  • D&A: Depreciation, DepreciationDepletionAndAmortization, DepreciationAndAmortization and their own children all map to DepreciationExpense; depletion is unmapped; cash-flow add-backs take the income-statement concept although DepreciationAmortizationCF exists (that part is a data fix).
  • SG&A: SellingAndMarketingExpense (1,445 companies), GeneralAndAdministrativeExpense (4,780, confidence 1.0) and SellingExpense all map to SellingGeneralAndAdminExpenses with is_total: true. Intuit FY2026 shows two face lines under one concept. The legacy store keeps them apart; the reverse index overrides it. ASU 2024-03 adds a selling-expense disclosure (ASC 220-40-50-35) from FY2027.

Who would benefit from this feature?

  • [ ] Beginner Python users working with SEC filings
  • [x] Financial analysts and researchers
  • [x] Advanced developers building financial applications
  • [x] Data scientists working with financial datasets

Proposed Solution

Describe the solution you'd like

  • One canonical total element per standard concept; calculation descendants map to component concepts.
  • Add S&M (or selling) and G&A concepts as children of SG&A, and split D&A into a total, depreciation, intangible amortization and depletion, with parent and child flags.
  • Add a test that fails when two members of one concept are calculation-related in the current FASB linkbase (the #839 precedent: remap, fix the section, add reverse-index assertions).

Describe alternatives you've considered Leaving parts and totals together and documenting it; summing by standard_concept then double-counts.

Use Case Example

How would you use this feature?

df = income_statement.to_dataframe()
df.groupby("standard_concept")["value"].sum()   # should not double-count a total and its parts

Implementation Considerations

Complexity Level:

  • [ ] Simple (minor API addition)
  • [x] Moderate (new functionality with existing patterns)
  • [ ] Complex (significant architectural changes)

Backwards Compatibility:

  • [ ] This feature maintains backwards compatibility
  • [x] This feature might break existing code (please explain below)
  • [ ] Unsure about compatibility impact

Code that reads SellingGeneralAndAdminExpenses for a filer that reports S&M and G&A separately would see those lines under new concepts.

Additional Context

Related Issues/Features: #1417; the total-guard bug (#1444).

synfonia-llc avatar Oct 06 '26 10:10 synfonia-llc

@dgunning, here is our current thinking on the root cause, proposed behavior, and coordination with other issues.

Root Cause:

Several distinct SG&A and D&A measures receive the same standard identity and display meaning. The landed total-membership guard does not separate those expense definitions.

Proposed Behavior:

Separate the named selling, marketing, G&A, D&A and DD&A source concepts while retaining filed amounts, captions and source qualifiers. Give Depletion its own identity and keep family associations separate from measure identity or an additive equation. SellingGeneralAndAdminExpenses and DepreciationExpense remain mixed after this first increment, including the deferred oil-and-gas depletion mapping, so their global definitions stay unchanged and the issue remains open. Cash-flow add-back identities also remain follow-up work after #1452's occurrence adapter; they are not delivered by these named assignments.

Coordination:

I recommend one bounded first PR, agreeing definitions with #1452 before #1449 consumes precise identities; it cannot treat the still-mixed targets as precise DISE categories. Coordinate #1446's legacy route and serialize overlapping mapping-data edits, keeping #1444's landed guard as a control.

Below, please find the full design document. Please let me know your thoughts.

Brian

Attachment: design-public.md, Proposal for #1451: preserve expense components separately from their aggregates.

AI assistance: Codex; GPT-6.1 Sol (High) for current-main scouting, focused offline probes, and final writing; GPT-6 Astra (Max) for architecture, taxonomy-source checks, and drafting, with a separate agent providing independent financial statement review of expense definitions, statement use, and aggregation limits. Claude Opus 5.5 (High) performed adversarial review and independent resolver review; GPT-6.1 Sol (High) revised the proposal against those findings. A separate GPT-6.1 Sol (High) reviewed the revised financial/source meaning and public readiness.

synfonia-llc avatar Oct 27 '26 11:10 synfonia-llc