Market cap fallback (shares × price) is wrong for multi-class companies #40

Closed
opened 2026-11-06 04:00:14 +00:00 by chris-kreidl · 3 comments
chris-kreidl commented 2026-11-06 04:00:14 +00:00 (Migrated from github.com)

🤖 Claude: Found while discussing #37 / #39.

When Yahoo returns no market cap, enrich-prices.ts falls back to shares × price, where shares comes from the 10-K and price is the quote for the one ticker we mapped:

let marketCap = quote.marketCap;
if (!marketCap && company.shares && quote.price) {
  marketCap = company.shares * quote.price;
}

For a company with more than one share class, this can be badly off:

  • Classes at very different prices. BRK-A is about $856,700 and BRK-B about $572. Multiplying all shares by one class's price overstates or understates the market cap by orders of magnitude.
  • Share count for one class only. If the 10-K share count covers only some of the classes, the market cap comes out too low.

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:** Found while discussing #37 / #39. When Yahoo returns no market cap, `enrich-prices.ts` falls back to `shares × price`, where `shares` comes from the 10-K and `price` is the quote for the one ticker we mapped: ```ts let marketCap = quote.marketCap; if (!marketCap && company.shares && quote.price) { marketCap = company.shares * quote.price; } ``` For a company with more than one share class, this can be badly off: - **Classes at very different prices.** BRK-A is about $856,700 and BRK-B about $572. Multiplying all shares by one class's price overstates or understates the market cap by orders of magnitude. - **Share count for one class only.** If the 10-K share count covers only some of the classes, the market cap comes out too low. 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?
chris-kreidl commented 2026-11-06 05:39:48 +00:00 (Migrated from github.com)

🤖 Claude: Measured on real data after the 2026-11-06 enrichment (on main, with #39's primary tickers).

Count
Companies sent to Yahoo (passed pricing eligibility) 1,668
Got a price 1,579
Market cap from the shares × price fallback 21
…of those, rankable (≥ $50M, not Financials or Utilities) 16 of 1,367 rankable (~1.2%)

How I counted: a row used the fallback when liveMarketCap equals shares × price exactly.

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.

🤖 **Claude:** Measured on real data after the 2026-11-06 enrichment (on `main`, with #39's primary tickers). | | Count | |---|---| | Companies sent to Yahoo (passed pricing eligibility) | 1,668 | | Got a price | 1,579 | | Market cap from the shares × price fallback | 21 | | …of those, rankable (≥ $50M, not Financials or Utilities) | **16 of 1,367 rankable (~1.2%)** | How I counted: a row used the fallback when `liveMarketCap` equals `shares × price` exactly. 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.
chris-kreidl commented 2026-11-06 05:54:19 +00:00 (Migrated from github.com)

let's exclude.

let's exclude.
chris-kreidl commented 2026-11-06 05:55:50 +00:00 (Migrated from github.com)

🤖 Claude: Acceptance criteria for (a) exclude:

  • When Yahoo returns a price but no market cap, enrichment stores no live market cap. The shares × price fallback is gone.
  • Ranking uses only the Yahoo market cap from this run, for eligibility (≥ $50M) and for EY. It no longer falls back to the 10-K public float (COALESCE(liveMarketCap, marketCap) in export-ranking.ts). Without this, a company Yahoo gave no market cap would still be ranked on public float.
  • A company with a price but no Yahoo market cap is not ranked (unit test in test/eligibility.test.ts).
  • Real data: the ranked CSV drops the companies whose market cap came from either fallback, and no others.

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.

🤖 **Claude:** Acceptance criteria for (a) exclude: - [ ] When Yahoo returns a price but no market cap, enrichment stores no live market cap. The `shares × price` fallback is gone. - [ ] Ranking uses only the Yahoo market cap from this run, for eligibility (≥ $50M) and for EY. It no longer falls back to the 10-K public float (`COALESCE(liveMarketCap, marketCap)` in `export-ranking.ts`). Without this, a company Yahoo gave no market cap would still be ranked on public float. - [ ] A company with a price but no Yahoo market cap is not ranked (unit test in `test/eligibility.test.ts`). - [ ] Real data: the ranked CSV drops the companies whose market cap came from either fallback, and no others. 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.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ckreidl/screener#40
No description provided.