edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

N-PORT: `FundReport.investment_data()` drops the "other" identifier (item C.1.e.iv) that `Identifiers.from_xml` parses

Open mmitc opened this issue 1 month ago • 0 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.62.0, and main at 8cd5799f Python Version: 3.12.13 Operating System: Windows 11

Bug Description

What you expected to happen: investment_data() carries the other unique identifier a filer states where a holding has no CUSIP, ISIN or ticker, since Identifiers.from_xml already parses it into investment.identifiers.other.

What actually happened: No column carries it. On BlackRock's BHK N-PORT-P, 121 of 1,487 non-derivative holdings state one (for example {'BlackRock Identifier': 'BRST69T59'}), and for BHK's reverse repos and loans it is the only thing that tells two rows apart: 45 repos share one bank, one name and one title. Because the frame is also sorted by value, a row cannot be paired back to report.investments by position. Only derivative_data maps identifiers.other today. The key's case also varies within one filing (BlackRock Identifier and Blackrock Identifier).

Error message (if any):

None.

Reproduction

Company/Ticker: BHK (BlackRock Core Bond Trust) Time Period: period ended 2026-06-30 Relevant Forms: NPORT-P, accession 0001410368-26-085673

Minimal code to reproduce:

from edgar import set_identity, find
from edgar.funds.reports import FundReport

set_identity("Your Name [email protected]")
report = FundReport.from_filing(find("0001410368-26-085673"))
stated = [i for i in report.non_derivatives if i.identifiers and i.identifiers.other]
print(len(stated), stated[0].identifiers.other)   # 121, e.g. {'BlackRock Identifier': 'BRST69T59'}
print("other" in report.investment_data().columns, list(report.investment_data().columns)[:8])
# False ['name', 'title', 'lei', 'cusip', 'ticker', 'isin', 'balance', 'units']

Additional Context

Suggested fix: add an other_id column (the first value of identifiers.other, or a JSON of the dict) beside cusip and isin, as derivative_data already does with main_internal_id. Happy to send a PR.


Generated by Claude Code

mmitc avatar Oct 17 '26 01:10 mmitc