Inherit two positioning-series properties from crowdmon - #9
Merged
Conversation
…ng deprecated Both have the same root cause: COT positioning is slow-moving, so a positioning series behaves much more like a random walk than like a sequence of draws. Two standard procedures break on that in ways that look like results rather than like errors. Docs only, no code change; 236 tests pass and ruff is clean. Section 1, percentile exceedances arrive in episodes. Over 117,940 scored market-weeks, 10.11% sit above the 95th percentile against a nominal 5%, mean run 4.8 weeks, 90th percentile 12, longest 42, and 57.6% of hot weeks are inside runs of 8 or more. A 95th-percentile reading is the middle of an episode, so anything treating "weeks above the 95th" as a sample size has an effective sample roughly a fifth of nominal. That fact and its consequence have different owners, and splitting them is how one goes stale, so this is the single statement of it and consumers should cite rather than restate. Its scope is stated too: the figures were measured on a z-score percentile panel over Managed Money positioning, not on this package's own index. The cause transfers, the specific rates have not been re-measured here, and that re-measurement is named as cheap and worth doing before anyone quotes 10.11% of a cotmetrics index. Section 2, correlating positioning levels is spurious. Managed Money net positioning is near unit-root at a median lag-1 of 0.956 (0.211 first-differenced), so a level correlation between two such series is Granger-Newbold in textbook form. An independent random walk scores a maximum level correlation of 0.773 against the panel half the time. Cross-complex pairs whose true correlation is zero exceed 0.5 on levels 33.5% of the time and on first differences 0.0%. The rule: test on first differences, against a noise band computed from the same panel. The band matters as much as the differencing, since without it there is no way to tell 0.2 from 0.5. Section 3 is new here and is a CHECK TO RUN, not a defect report, which the text says explicitly. calculate_spearman_correlation and its vectorised twin correlate price levels against positioning levels; CotIndexer emits six columns per lookback (commercial/large/small, raw and OI-normalised) at each configured lookback, and the regime-shift signal reads the commercial series at 13 weeks and thresholds its velocity. Three differences from section 2 mean nothing should be concluded without measuring: it is a within-market question rather than a cross-market one, the windows are short, and the signal thresholds velocity against a rolling baseline. The published columns carry no such treatment. What is missing is the null, which has never been measured on this data. Worth noting because it inverts the intuition: window length cuts the wrong way as it grows. A longer window gives a spurious-regression problem more room, so the 52-week columns are the most exposed and are exactly the ones a reader is likeliest to treat as the reliable version. Stakes are stated so it is not over-read: npf consumes none of these columns. Its only spearman is wfc_gate.correlation_method, which correlates in-sample against out-of-sample performance and touches no positioning level. Restated, never moved. crowdmon's amendments are point-in-time records under that repo's doc lifecycle and are not edited by the harvest; both sections cite their source and reproducer. Creates docs/ and links it from the README, since the directory did not exist. Co-Authored-By: Claude Opus 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.
crowdmonis being deprecated. Two of its measurements are properties of the positioning series this package computes on, so they belong here regardless of what happened to its hypothesis. Completes the harvest begun in crowdmon #81 and cotdata #102.Docs only. No code change. 236 tests pass, ruff clean.
Both properties have one root cause: COT positioning is slow-moving, so a positioning series behaves much more like a random walk than like a sequence of draws. Two standard procedures break on that, in ways that look like results rather than like errors.
§1 Percentile exceedances arrive in episodes, so a count of them is not a sample size
Over 117,940 scored market-weeks: 10.11% sit above the 95th percentile against a nominal 5%, mean run 4.8 weeks, 90th percentile 12, longest 42, and 57.6% of hot weeks are inside runs of 8 or more.
A 95th-percentile reading is the middle of an episode, not a one-in-twenty event. Anything treating "weeks above the 95th" as a sample size has an effective sample roughly a fifth of nominal.
Two things about how this is written:
§2 Correlating positioning levels is spurious
Managed Money net positioning is near unit-root: median lag-1 autocorrelation 0.956, against 0.211 first-differenced. A correlation between two such series is Granger-Newbold in textbook form.
r~0), median |r|A series with no relationship to anything scores a maximum level correlation of 0.773 half the time. The rule: test on first differences, against a noise band computed from the same panel. The band matters as much as the differencing, because without it there is no way to tell an unremarkable 0.2 from a meaningful 0.5.
§3 An open check in this package, which is a check and not a defect report
calculate_spearman_correlationand its vectorised twin correlate price levels against positioning levels.CotIndexeremits six columns per lookback (commercial / large / small, raw and OI-normalised) at each configured lookback (Custom,26,52), and the regime-shift signal reads the commercial series at 13 weeks and thresholds its velocity.Same statistical structure as §2, and three differences mean nothing should be concluded without measuring: it is a within-market question rather than a cross-market one, the windows are short, and the signal thresholds velocity against a rolling baseline. The published columns carry no such treatment.
What is missing is the null. This statistic's noise band has never been measured on this data, while §2 has now measured a very wide band for a close relative.
One point that inverts the intuition and is worth flagging: window length cuts the wrong way as it grows. A longer window gives a spurious-regression problem more room, not less, so the 52-week columns are the most exposed and are exactly the ones a reader is likeliest to treat as the reliable version.
Stakes, so this is not over-read:
npfconsumes none of these columns. Its onlyspearmaniswfc_gate.correlation_method, which correlates in-sample against out-of-sample performance and touches no positioning level. These are displayed indicators here and incot-analyzer, not traded inputs.Method
Restated, never moved. crowdmon's amendments are point-in-time records under that repo's doc lifecycle and are not edited by the harvest; both sections cite their source section and reproducer. Both were read in full before restating, not summarised from headers, which is the standard the harvest adopted after two findings were mis-classified from their headers alone.
Creates
docs/and links it from the README, since the directory did not exist.Plain-language bottom line
A neighbouring project is being shelved, and on the way it measured two things about how COT positioning behaves that are true regardless of whether its own idea worked. Both are about the same underlying fact: positioning barely moves week to week, so it looks like a trending series rather than a set of independent readings. That makes extreme readings cluster into runs rather than appear at random, and it makes two positioning series look correlated when they have nothing to do with each other. Anyone computing an error bar or a correlation on this package's output needs both, so they now live here rather than in a repo going quiet.
The third section is a question rather than an answer: this package computes a correlation of exactly the vulnerable kind, and nobody has measured how large that correlation gets by chance. It may well be fine. It has not been checked, and the check is cheap.
🤖 Generated with Claude Code