Skip to content

Strip: the same positioning, measured in dollars at risk - #63

Merged
mspinola merged 3 commits into
mainfrom
claude/strip-page-positioning-5ad4bc
Aug 24, 2026
Merged

Strip: the same positioning, measured in dollars at risk#63
mspinola merged 3 commits into
mainfrom
claude/strip-page-positioning-5ad4bc

Conversation

@mspinola

Copy link
Copy Markdown
Owner

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.md with 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, or None. Under Dollars a 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:

pair correlation p95 gap, index points different band
contracts vs risk (Raw PF 5/95) 0.917 30.4 11.7% of weeks
contracts vs notional 0.979 14.5 5.4%
share of OI vs risk (NPF 20/80) 0.896 33.9 20.7%

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

  • One reference mark, not a fifth mark. The ring and the diamond ask the same shape of question and at 22px they are one smudge together. The control also lets both be turned off, which the page could not do before.
  • The mark takes the row's colour. Every palette slot is already a verdict here (grid_colors builds 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.
  • The connector stays, unlike the prior mark's, because here the gap is the subject and the ink is self-limiting: a market whose lenses agree draws a line of zero length.
  • Three bands, not a boolean. Silver's 0-against-96 is both ends of the axis at once, and asking only whether each reading is through a gate scores that as agreement.
  • Off by default, and cached per market by the store's newest date: about 4s cold for the universe, 0.3s warm.
  • A share of open interest is the same number in contracts and in dollars to 2.2e-16, so there is no dollar version of the NPF basis; the caption states the window and the unit rather than implying only one thing changed.

Testing

464 passed, 17 of them new, plus ruff check src tests clean. 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

@mspinola
mspinola force-pushed the claude/strip-page-positioning-5ad4bc branch from 59129d4 to f7798bd Compare August 24, 2026 21:54
mspinola and others added 3 commits August 24, 2026 17:56
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
mspinola force-pushed the claude/strip-page-positioning-5ad4bc branch from f7798bd to 7a15d1a Compare August 24, 2026 21:56
@mspinola
mspinola merged commit 1b6f95a into main Aug 24, 2026
3 checks passed
@mspinola
mspinola deleted the claude/strip-page-positioning-5ad4bc branch August 24, 2026 22:29
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