Skip to content

fix(panel): pivotalness null where ownership is unknown, not "not pivotal" - #98

Merged
edwinhu merged 1 commit into
mainfrom
fix/pivotal-null
Jul 27, 2026
Merged

fix(panel): pivotalness null where ownership is unknown, not "not pivotal"#98
edwinhu merged 1 commit into
mainfrom
fix/pivotal-null

Conversation

@edwinhu

@edwinhu edwinhu commented Jul 27, 2026

Copy link
Copy Markdown
Owner

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.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 — a large minority of the panel, not an edge.

inst_pivotal_net four lines below already did it correctly, and its comment states the entire 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.

Digest impact: inst_pivotal / mf_pivotal / passive_pivotal / index_pivotal go from {0,1} to {0,1,.}. B moves on those four columns by design; nothing else should.

…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
edwinhu marked this pull request as ready for review July 27, 2026 16:05
@edwinhu
edwinhu merged commit 161dd4f into main Jul 27, 2026
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.

1 participant