Repository navigation
fix(compute): a derivative needs a 4-letter Nasdaq base - #37
Merged
Merged
Conversation
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
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Fixes #33. Thanks to @miele975 for the diagnosis and the proposed fix.
derivative_listingsruns over the whole universe inbuild_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_cikuses the same rule, so its DAVEW test is unchanged.Checked on the published
data-latestuniverse: 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 pytestanduv run ruff check src testspass (549 passed)npm --prefix ui run test -- --runpasses (UI untouched)test_derivatives_need_a_four_letter_base)