Exposure: the contributions table follows the Lookback control - #66
Merged
Conversation
mspinola
force-pushed
the
claude/exposure-contracts-percentile
branch
from
August 24, 2026 22:31
7e4cada to
379bbeb
Compare
The headline, the band, the %ile scale and the caption all ranked over whatever Lookback resolved to. The contributions table under them ranked every member against all history whatever the control said, because contribution_table called expanding_pct_rank unconditionally. So on "52 weeks" the page said "higher than 97% of the last 52 weeks" three lines above a column headed "%ile" measured against twenty years, with both on screen at once and nothing on either saying they were different questions. Live, Gold alone on 52 weeks: headline 62nd percentile, table row 99. Now 62 and 61.5. Threading the window through rather than explaining it in copy. The expanding rank has a real claim on this page, since no unit here is stationary through time and it is the only form that can say "the most ever", but that is an argument for keeping All history as the DEFAULT, which it is, and not for ignoring a control after the reader has moved it. Copy can describe two bases; it cannot make them comparable, and the question the table answers is "which market is driving the number in the headline". Three columns move together or none of them do. The dollar percentiles ride the `window` parameter cotmetrics 0.9.0 added to contribution_table, which is why the floor moves with this: against 0.8.0 the keyword raises TypeError on every render and no setting of the control avoids it. The Contracts %ile column from #64 follows in the same change, since it was written to match whatever the dollar columns did and moving one without the other puts the row back to mixing histories by the other route. The copy that goes false the moment the arithmetic lands, all in here rather than in a follow-up: the dollar column's "Against all of it, whatever the Lookback control says", the table label, and the standing explanation, which told a reader who moved the control that the band moved with it and said nothing about the table. The label also absorbs the second imprecision #64 left for whoever next edited it, that a member's "own history" is the weeks the SET covers (gold 88 alone, 81 in a set starting in 2002 because Russell does). Both restrictions are named, and the set clause is dropped on a single market, where it has nothing to qualify. The default is asserted rather than left to a constant: attach_contracts_rank without a window reads 0.91 on the fixture against 1.92 at 52 weeks and 3.85 at 26, so the expanding assertion discriminates, and the test now says so. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mspinola
force-pushed
the
claude/zealous-sutherland-b45608
branch
from
August 24, 2026 22:34
035e0ef to
0ea9a86
Compare
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 headline, the band, the %ile scale and the caption all ranked over whatever the Lookback control resolved to. The contributions table under them ranked every member against all history whatever the control said, because
contribution_tablecalledexpanding_pct_rankunconditionally. So on "52 weeks" the page said "higher than 97% of the last 52 weeks" three lines above a column headed "%ile" measured against twenty years, with both on screen at once and nothing on either saying they were different questions.Live, Gold alone on Lookback 52 weeks:
Why threading it through rather than explaining it
The expanding rank has a real claim on this page. No unit here is stationary through time, and it is the only form that can say "the most ever". But that is an argument for keeping All history as the default, which it is, not for ignoring a control after the reader has moved it. Copy can describe two bases; it cannot make them comparable, and the question the table answers is "which market is driving the number in the headline".
Three columns move together or none of them do
windowparameter oncotmetrics.exposure.contribution_table(Rank a contribution table over a window, not always all history cotmetrics#32)Contracts %ilecolumn from Exposure: the contract percentile, per market #64, which was written to match whatever the dollar columns did. Moving one without the other puts the row back to mixing histories by the other route.Copy that goes false the moment the arithmetic lands
All in here rather than in a follow-up:
The label also absorbs the second imprecision #64 left for whoever next edited it: a member's "own history" is the weeks the SET covers, since
aggregate_exposurerestricts every member to the weeks the total can price. Gold reads 88 alone and 81 in a set starting in 2002 because Russell does. Both restrictions are now named, and the set clause is dropped on a single market where it has nothing to qualify.Floor
cotmetrics[options]>=0.9.0, a correctness floor of the loudest kind: against 0.8.0 the keyword does not exist, the call raisesTypeErroron every render, and no setting of the control avoids it.Stacking, now resolved
Was stacked on #64 and blocked on mspinola/cotmetrics#32. Both have merged, so this is rebuilt as a single commit on
main(3d3f1c6) with no merge commits, andcheck_dep_floors.pyis green:cotmetrics 0.9.0 satisfies '>=0.9.0'.Verification
492 tests pass,
ruff check src testsclean on 0.15.22, floors green. Run against the real cotmetrics 0.9.0 editable install with noPYTHONPATHshadowing. Verified against the live store by rendering the page callback headlessly rather than in a browser. Nothing about the layout changed, only text and which weeks the ranks run over.Reasoning recorded in
docs/design/positioning-report-view-ideas.mdunder "The Lookback control reaches the table (2026-08-24)".🤖 Generated with Claude Code