Late-entry replay: every later listing of a signal scored against its first report (#115) - #116
Merged
Merged
Conversation
…st its first report walk_forward records the later CONFIRMED listings of an already-seen signal (first_day, listed_day = sessions since the first report) and fills them at the next open under the same rules (shared _fill_outcome). late_entry_table summarises each day on the list and pairs every traded listing with its own first report (mean difference, month-block interval); rendered per window, in the JSON as `late` and `repeats`. The backtest workflow keeps its JSON as an artifact so the yearly point-in-time runs pool exactly. Tests, wiki 04, changelog. #115 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <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.
Summary
The question behind #115: the report shows a confirmed row again on every following session (HAL for a week), but every replay fills a signal once, at its first report. This PR makes the backtester score the later listings too, and carries the eleven-year finding.
Code
walk_forward(..., repeats=[])records every laterCONFIRMEDlisting of an already-seen signal (first_day,listed_day= sessions since the first report), filled at the next open under the same rules through the shared_fill_outcome; the first-seen rows are unchanged (asserted by a test).late_entry_tablesummarises each day on the list and pairs every traded listing with its own first report (mean difference and its month-block interval); rendered per window as Late entry, in the JSON aslateandrepeats.backtestworkflow keepsbacktest.jsonas an artifact (backtest-<run id>,actions/upload-artifactSHA-pinned) so several runs pool exactly.Finding (runs 34323013559 to 34323039560, tuned, point-in-time membership,
bars=500,horizon=60; 1692 first-seen signals, 4915 later listings; full tables on #115)Test plan
ruff --select E,F,W --line-length 120clean, 140 tests pass locallytestsworkflow on this PR🤖 Generated with Claude Code