Strip: the same positioning, measured in dollars at risk - #63
Merged
Conversation
mspinola
force-pushed
the
claude/strip-page-positioning-5ad4bc
branch
from
August 24, 2026 21:54
59129d4 to
f7798bd
Compare
The printed positioning reports this page was modelled on draw each position twice, once in contracts and once in dollars. Holding the market, the leg, the window and the statistic constant and changing only the unit, the two are not the same series: dollar risk correlates 0.917 with the contract reading at the median, parts from it by 30 index points at the 95th percentile, and lands in a different one of the model's three bands on 11.7% of weeks. On 2026-08-18, 13 of the 45 priceable markets disagree. Silver is the case it was built from. Commercials sat at the very bottom of their 24-week contract range and at 96 on dollars at risk, because daily volatility had fallen from 6.7% to 2.7% across the window, so a record short carried a third of the money. Natural Gas runs the other way, 99 against 9. Dollar NOTIONAL is measured and deliberately not drawn (0.979, 14.5 points, 5.4%). Over a rolling window it is contracts times a slowly-moving price, so a second mark for it would sit on top of the first. It is one line in the hover, because it is the reading those reports plot. One reference mark per row, chosen by a new COMPARE control, rather than a fifth mark on a 22px row: the six-weeks-ago ring and the dollar diamond ask the same shape of question and at that height they are one smudge together. The mark takes the row's own colour, because every palette slot is already a verdict here, and it keeps its connector, because the gap is the subject and the ink is self-limiting (a market whose lenses agree draws a line of zero length). Disagreement is counted on three bands rather than on a gap in points, since Silver's 0-against-96 is both ends of the axis at once and a boolean scores it as agreement. Off by default: it is the only thing this page draws that needs the price store. Measurements and reproducer in docs/analysis/2026-08-24-contracts-against-dollars.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The first reader of the new mark asked whether the diamond was a percentile. It is not: it is the same range index the lollipop beside it carries, position between the window's min and max, computed on dollar risk instead of on contracts. Holding the statistic and the window fixed is what makes the pair a comparison of UNITS, and the percentile version of the question is the /exposure page's. The word now appears where the mark is, not only in the design doc: "Same index in $ at risk (24w)" and "Same index on notional" in the hover, "Same index, in $ at risk" in the legend key, and a caption that says a range position and not a percentile in as many words. The caption also drops "through a gate band" for "which band they are in", which is what the three-band count actually measures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The share-of-open-interest cancellation this measured from the contracts side was frozen independently as P5 of the pre-registration behind cotmetrics 0.8.0 and is asserted in that package's tests from the NUMERAIRE side: a share must not move when the Gold switch does. That is the half worth asserting in code, because it is the half that can break, and it did once, in a cut that deflated the position columns and not the open-interest ones so the share carried 1/gold. The residual reported here is floating-point division rather than a measurement, and the script applies no numeraire, so it cannot break that way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mspinola
force-pushed
the
claude/strip-page-positioning-5ad4bc
branch
from
August 24, 2026 21:56
f7798bd to
7a15d1a
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 printed positioning reports this page was modelled on draw each position twice, once in contracts and once in dollars. This adds that second reading to the strip as an optional mark, and the measurements that decided its shape are in
docs/analysis/2026-08-24-contracts-against-dollars.mdwith a reproducer script beside it.What it draws
A new COMPARE control picks the one reference mark each row carries:
6w ago(today's hollow ring, still the default),Dollars, orNone. UnderDollarsa hollow diamond marks the same 0-100 range index, over the same window and on the same leg, computed on dollar risk (contracts x point value x price x daily volatility) instead of on contracts, with a hairline back to the contract reading. It is a range position like the lollipop, not a percentile; the percentile version of this question belongs to/exposure.Why risk and not notional
Holding market, leg, window and statistic constant and changing only the unit, across 44 markets:
Over a rolling window notional is contracts times a slowly-moving price, so a second mark for it would sit on top of the first. It is one line in the hover instead, because it is the reading those reports plot.
On 2026-08-18, 13 of the 45 priceable markets land in a different band under the two lenses. Silver is the case it was built from: Commercials at the very bottom of their 24-week contract range and at 96 on dollars at risk, because daily volatility fell from 6.7% to 2.7% across the window, so a record short carries a third of the money. Natural Gas runs the other way, 99 against 9.
The gap is not simply "volatility is high": correlated 0.25 with the market's own volatility index at the median and sign-flipping across markets (33 positive, 11 negative), because volatility acts on a position that has a side. It is a state rather than a jitter (lag-1 autocorrelation 0.918).
Design notes
grid_colorsbuilds bull from slot 3, which is also Price, and bear from slot 0, which is also Commercials), so shape carries which comparison it is and colour goes on meaning verdict.Testing
464 passed, 17 of them new, plus
ruff check src testsclean. Verified in the browser at one and two columns under both models: marks, connector, hover, legend key, caption counts, and no console or server errors.🤖 Generated with Claude Code