edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

BDC: `from_xbrl` drops a costed loan as the "total" of a sibling with the same fair value (ARCC Proofpoint second lien, $50.5M)

Open mmitc opened this issue 1 month ago • 2 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.61.1 (also 5.60.0, where _exclude_restated_rows arrived) Python Version: 3.14.3 Operating System: Windows 11 Pro 10.0.26300 (live check); reproduced offline on Linux, Python 3.13

Bug Description

What you expected to happen: Ares Capital's two Proofpoint second-lien loans are both kept:

identifier fair value cost
Proofpoint, Inc. | Second lien senior secured loan $50,500,000 $52,600,000
Proofpoint, Inc. | Second lien senior secured loan 1 $50,500,000 $51,600,000

What actually happened: The first loan lands in .excluded with the reason total of 1 row(s) that extend it. The "parents of their own tranches" rule in _exclude_restated_rows compares fair value only, and never looks at cost. It drops a row when the rows extending its identifier sum to its fair value.

Two pairs of $100,000 loans are dropped the same way: RMS HoldCo II and Nordic Ferry, where each pair has an identical cost. Together the three drops make exactly the gap between the kept rows ($29,298,600,000, 1,444 rows) and the library's own reported_total_fair_value ($29,349,300,000). Before 5.60.0 our book of this filing matched the reported total to the dollar.

The rule correctly drops five other rows in this filing (APG, Bragg Live Food, Partnership Capital Growth III, ACAS Equity, European Capital UK SME Debt). All five state no cost and are headers over a single holding. All three wrong drops state their own cost.

Error message (if any):

None. Kept rows sum $50.7M below reported_total_fair_value.

Reproduction

Company/Ticker: ARCC (Ares Capital Corp) Time Period: quarter ended 2026-06-30 Relevant Forms: 10-Q, accession 0001628280-26-050307

Minimal code to reproduce:

from edgar import set_identity, find
from edgar.bdc.investments import PortfolioInvestments

set_identity("Your Name [email protected]")
held = PortfolioInvestments.from_xbrl(find("0001628280-26-050307").xbrl())

print(len(held), sum(i.fair_value for i in held), held.reported_total_fair_value)
# 1444 29298600000 29349300000
for e in held.excluded:
    if e.reason.startswith("total of 1 row"):
        print(e.investment.identifier, e.investment.fair_value, e.investment.cost)
# Proofpoint, Inc. | Second lien senior secured loan 50500000 52600000   <- a real loan
# (also RMS HoldCo II and Nordic Ferry at 100000/100000, and five cost-less headers)

Additional Context

In this filing, cost separates the two cases cleanly:

  • every true one-row parent states no cost;
  • every wrongly dropped row states its own cost.

A matching cost doesn't make a row a restatement either, as RMS and Nordic Ferry show. So, as a proposal: a parent that states its own cost isn't excluded as the total of a single extending row. With several extending rows, a costed parent could also be required to match their summed cost. Running it against the cases the 5.60.0 notes cite (MAIN's Bolder Panther tranches, ARCC's Ivy Hill) would show whether every true parent stays excluded. We're happy to send a PR with a regression test.


Generated by Claude Code

mmitc avatar Oct 11 '26 11:10 mmitc

Thanks for the clear report. It's fixed in #1506 and will ship in 5.62.0, the last 5.x release, which is being cut from 5.62.x. The fix is also on main for 6.0.

I took your first proposal: a row that states its own cost is no longer excluded as the total of a single extending row. Over 16 BDC 10-Qs only ARCC changes. It goes from 1,444 to 1,447 rows, and the kept rows now equal the reported $29,349.3M exactly. The five cost-less headers stay excluded.

I held back your second suggestion, requiring a costed multi-row parent to match its parts' summed cost, because it's too large a change for the freeze. It moves MAIN's exclusions from 13 to 2 and happens to close MAIN's −$7.2M default-args gap, so it looks worth pursuing. If you'd like to take it on for 6.0, a PR measured against the BDC set would be welcome.

dgunning avatar Oct 11 '26 12:10 dgunning

Follow-up on the merged fix: https://github.com/dgunning/edgartools/pull/1506#issuecomment-6109267018


Generated by Claude Code

mmitc avatar Oct 11 '26 12:10 mmitc