Skip to content

fix(compute): a derivative needs a 4-letter Nasdaq base - #37

Merged
maxgfr merged 1 commit into
mainfrom
issue-33-derivative-base-length
Oct 26, 2026
Merged

maxgfr merged 1 commit into
mainfrom
issue-33-derivative-base-length

Conversation

@maxgfr

@maxgfr maxgfr commented Oct 26, 2026

Copy link
Copy Markdown
Owner

What & why

Fixes #33. Thanks to @miele975 for the diagnosis and the proposed fix.

derivative_listings runs over the whole universe in build_symbol_rows, and it accepted a base of any length for a suffix written without a separator. As a result, MU (M + U), PHR (PH + R), DOCU, CHTR, TER, VRT, CPRT and others got no snapshot row at all.

A suffix without a separator now only counts after a 4-letter base, which is the Nasdaq 5th-letter convention (DAVEW, ACAHU). symbols_by_cik uses the same rule, so its DAVEW test is unchanged.

Checked on the published data-latest universe: the 312 matches drop to 230, all real derivatives (227 SPAC units plus HAVAR, SPEGR and PSNYW). None of MU/DOCU/CHTR/TER/WU/VRT/CPRT is flagged any more. The affected companies come back after a full recompute.

Checklist

  • uv run pytest and uv run ruff check src tests pass (549 passed)
  • npm --prefix ui run test -- --run passes (UI untouched)
  • Zero-key contract holds: no core flow gained a key/account requirement
  • If the DSL grammar changed: n/a
  • New behavior is covered by a test (test_derivatives_need_a_four_letter_base)

A suffix without separator (W/U/R/WS/WT/UN/RT) only marks a warrant,
unit or right as Nasdaq's 5th letter after a 4-letter base (DAVEW,
ACAHU). On a shorter base it is a coincidence between two listed
companies: MU (M + U), PHR (PH + R), DOCU, CHTR, TER, VRT, CPRT... were
dropped from the snapshot universe-wide since v0.15. On the published
universe, 312 matches shrink to the 230 real derivatives.

Fixes #33
@maxgfr
maxgfr merged commit 13b0891 into main Oct 26, 2026
3 checks passed
@maxgfr
maxgfr deleted the issue-33-derivative-base-length branch October 26, 2026 09:40
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.

derivative_listings drops real companies whose ticker is another ticker + W/U/R (PHR, ACHR, MU, TER...)

1 participant