fix(panel): pivotalness null where ownership is unknown, not "not pivotal" - #98
Merged
Conversation
…otal" The four pivotalness flags were `abs(forpct-50) <= coalesce(ior,0)`. The coalesce turns "we have no denominator for this firm" into "this firm's owners hold nothing" at the moment the flag is set, so a row with no measurable ownership was recorded as KNOWN NOT PIVOTAL — indistinguishable from one measured at 0.4% and genuinely not pivotal. It re-conflated downstream exactly what the upstream null exists to protect. #97 stopped leg 2 writing ior = 0.0 for an unknown denominator; this put the zero back one join later. 42.85% of leg-2 rows have no CRSP denominator and the ISS-side tso has its own gaps, so this is a large minority of the panel, not an edge. `inst_pivotal_net` four lines below already did it correctly, and its comment states the whole argument: "null where lending is unknown, so it cannot quietly fall back to the gross measure." Same reasoning, four columns earlier — the right remedy was already written in the same paragraph as the wrong one. Changes inst_pivotal / mf_pivotal / passive_pivotal / index_pivotal from {0,1} to {0,1,.}. Digest B moves on those four columns by design. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017AL2p8VC1ULxSibcCdEAsh
edwinhu
marked this pull request as ready for review
July 27, 2026 16:05
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.
The four pivotalness flags were
abs(forpct-50) <= coalesce(ior,0).That coalesce turns "we have no denominator for this firm" into "this firm's owners hold nothing" at the moment the flag is set — so a row with no measurable ownership is recorded as known not pivotal, indistinguishable from one measured at 0.4% and genuinely not pivotal.
It re-conflates downstream exactly what the upstream null protects. #97 stopped leg 2 writing
ior = 0.0for an unknown denominator; this put the zero back one join later. 42.85% of leg-2 rows have no CRSP denominator, and the ISS-sidetsohas its own gaps — a large minority of the panel, not an edge.inst_pivotal_netfour lines below already did it correctly, and its comment states the entire argument:Same reasoning, four columns earlier. The right remedy was already written in the same paragraph as the wrong one.
Digest impact:
inst_pivotal/mf_pivotal/passive_pivotal/index_pivotalgo from {0,1} to {0,1,.}. B moves on those four columns by design; nothing else should.