Repository navigation
/analysis: Commercial flow strip on the Positioning Index panel; Speculator line removed - #144
Merged
Merged
Conversation
…tor line removed
The Speculator line tracked Legacy Non-Commercial at 0.81 to 0.96 on physicals
and major currencies, so on most markets it repeated the blue line; where it
differed (equity index, Treasuries) it described composition, better said in
words. The strip moves to the Legacy Commercial leg: every setup is triggered
by the Commercial index at an extreme, and on equities it is the only leg the
gate reads.
- components/flow_strip.py (was speculator_traces.py): the Commercial leg's
weekly flow z below the index panel's zero, blue buying, red selling,
clipped at 3; the Commercial line's hover carries the week's flow beside its
index ("96 · flow z +0.94 (net +13,537 contracts)"); a one-line note says
equity setups read Commercials only and how retail behaves on the market.
- Reads CotIndexer.get_commercial_flow_data (cotmetrics 0.15.1, floor moved);
fetched only for a raw index panel. SPECULATOR_SLOT removed.
- Supersedes #143 (the Speculator-line hover).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Replaces the Speculator line and its strip (from #142) on the /analysis Positioning Index panel with a Commercial flow strip. Needs mspinola/cotmetrics#53 (0.15.1) merged first; the floor moves to 0.15.1.
Why. The Speculator line's weekly flow tracked Legacy Non-Commercial at 0.81 to 0.96 on physicals and major currencies (
docs/analysis/2026-09-26-cot-roles-vs-legacy-propadj.csvin cotmetrics), so on most markets it repeated the blue line; where it differed (equity index, Treasuries) the gap described composition, which a sentence says better. The strip moves to the leg every setup in the app is triggered on: the Commercial index at an extreme, and on equities the only legutils.is_setupreads.What the panel now shows (raw basis, single-market stack):
Commercial : 96 · flow z +0.94 (net +13,537 contracts).The % of OI and Raw vs %OI variants and the grid view are unchanged. Supersedes #143.
Verification: suite 907 passed, 10 store-free tests in
tests/test_flow_strip.py(one drives the real stack callback), ruff clean. Looked at in the running app on Gold (hover above; note "retail (Non-Reportable) moves with price here") and S&P 500 (note "Equities: setups read Commercial only, retail (Non-Reportable) does not move with price here").🤖 Generated with Claude Code