Market cap fallback (shares × price) is wrong for multi-class companies #40
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
epic:E1-foundation
epic:E2-correct-metrics
epic:E3-fast-jobs
epic:E4-cli
epic:E5-web-ui
epic:E6-history
good first issue
help wanted
invalid
question
sprint-tracking
story
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ckreidl/screener#40
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🤖 Claude: Found while discussing #37 / #39.
When Yahoo returns no market cap,
enrich-prices.tsfalls back toshares × price, wheresharescomes from the 10-K andpriceis the quote for the one ticker we mapped:For a company with more than one share class, this can be badly off:
A wrong market cap means a wrong EY, and it can also move a company across the $50M minimum.
How often: only when Yahoo omits
marketCap. In spot checks (BRK-A/B, GOOGL/GOOG), Yahoo returned the full company market cap for every class, so this didn't apply. I haven't measured how often the fallback runs on real data.Expected (product decision for Chris): for a multi-class company with no Yahoo market cap, do we (a) exclude it, (b) sum each class's shares × that class's price, or (c) keep the fallback but flag it in the CSV?
🤖 Claude: Measured on real data after the 2026-11-06 enrichment (on
main, with #39's primary tickers).How I counted: a row used the fallback when
liveMarketCapequalsshares × priceexactly.The 16: ITT, MSM, WELPP, WMK, NGL, NRP, UAN, NL, SWKHL, SDSYA, FC, BDL, SIF, GGROU, FTLF, MDNC. None looks like the BRK case (several listed classes at different prices), but I haven't checked each company's share structure. WELPP and SWKHL are preferred/note tickers, tracked in #45.
Recommendation: (a) exclude. When Yahoo gives no market cap, the company isn't ranked. It costs about 1% of rankable companies. Every ranked market cap then comes straight from Yahoo, and we need no code to detect share classes. Options (b) and (c) need a way to tell multi-class companies apart, which we don't have. For (b), SEC companyfacts also doesn't split share counts by class. For example, BRK's cover-page share count stops in 2011 and appears to cover one class only.
Your call. Once you decide, I'll write the acceptance criteria here.
let's exclude.
🤖 Claude: Acceptance criteria for (a) exclude:
shares × pricefallback is gone.COALESCE(liveMarketCap, marketCap)inexport-ranking.ts). Without this, a company Yahoo gave no market cap would still be ranked on public float.test/eligibility.test.ts).The public-float fallback matters now: on today's DB it ranks 3 companies (BTMWQ, DAVEW, DDT), all with no Yahoo market cap and no sector. They look like warrant or note tickers.