Skip to content

Fix equity trust valuation misclassification#5

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-899d
Draft

Fix equity trust valuation misclassification#5
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-899d

Conversation

@cursor

@cursor cursor Bot commented Jun 19, 2026

Copy link
Copy Markdown

Bug and impact

Equities whose names contain "Trust" (for example REITs like Digital Realty Trust) were misclassified as ETF/index instruments. Their valuation runs skipped the single-company DCF/comps path and persisted ETF-style relative regime outputs with DCF forced to zero.

Root cause

The ETF/index detector treated broad name keywords, including TRUST, as sufficient even when quote metadata identified the instrument as EQUITY.

Fix

  • Removed standalone TRUST from ETF/index name matching.
  • Let explicit ETF/fund metadata still win, but treat explicit equity/common-stock metadata as single-company valuation before falling back to name heuristics.
  • Added a regression test for an equity named Digital Realty Trust, Inc..
  • Aligned an existing valuation bridge assertion with the function's rounded cent-level output.

Validation

  • python3 -m unittest backend.tests.test_valuation_summary
Open in Web View Automation 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant