security: session-attributed weekly/monthly period keys - #161
Merged
Conversation
Weekly keys derived from shifted-instant weekdays split a Sunday-opened FX session across two ISO weeks (its evening bars carry Sunday's weekday). W/M period keys now attribute each session-day to the calendar period of its session OPEN: forex weeks start at the weekend-open session (TV's Sun-17:00-ET week), equity/24x7 feeds — whose sessions open and close on one local date and which declare no session window — keep the Monday-start epoch math bit-for-bit (gated on the declared session, preserving the corpus weekly pins). Evidence @ this tree: EURUSD htf-bucket-w probe 3.3% -> 93.7% (177/189); D and 240m hold at 100%; population e+s EURUSD 307->328 (+21), AAPL 241->256 (+15); ETH scraped 396/396 zero moves; corpus 309/2/1 identical, zero regressions; 133/133 unit tests.
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.
Round 3 of the symbol campaign (follows #159, #160).
Defect. Weekly keys took
tm_wdayof the shifted instant, so a Sunday-opened FX session straddled two ISO weeks — its Sunday-evening bars carried Sunday's weekday while its Monday bars flipped the key mid-session. TV forex weeks start at the weekend-open session (Sun-17:00-ET) and run to Friday's close.Fix. W/M period keys attribute each session-day to the calendar period of its session OPEN (computed via the local calendar date of the open epoch). Gated: session-less feeds (24x7 crypto, bare grids) keep the Monday-start epoch math bit-for-bit — corpus weekly pins untouched.
Evidence @ HEAD:
Symbol-gate PASS · pr-gate PASS (tie carried by trendmatrix MATCH probe, 822/822 exact identity). Known residual: ~12 W-probe trades at window edges + the trade #178 one-tick nuance (ledger finding 402 follow-ups).