Live track record: score the committed signals with the backtest's accounting - #117
Merged
Merged
Conversation
tools/evaluate_signals.py fills at the next session's open, does not trade an open above Max buy (gap) or at or below the stop (below_stop), closes an unresolved position at the horizon (expired) and keeps open for one still running; R from the fill. Rows carry fill and exit dates, profit percent and the sessions on which the signal was listed. fill_and_classify is shared: the backtest's _fill_outcome delegates to it, results unchanged. Tests, wiki 04, changelog. Groundwork for the website's track record. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 of 3 tasks
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
PR 1 of the website plan: the live track record has to use the same accounting as the replays, or the site's "what happened" table would not be comparable to the ten-year figures next to it (and to the late-entry table of #115).
Changes
tools/evaluate_signals.py: the fill is the next session's open; an open above the row's Max buy (gap) or at or below the stop (below_stop) is not traded; an unresolved position past the horizon isexpiredat that bar's close,openmeans still running; R is measured from the fill. Rows carryfill,fill_date,exit_date,pnl_pctand the sessions on which the signal was listed (listings,listed_days,last_listed); the summary adds the not-traded counts and the total R; the table gains Listed, Fill, Exit and P&L % columns.fill_and_classifyis the one implementation of the fill rules: the backtest's_fill_outcomenow calls it (expire=False, the replay's convention), with results unchanged, which the existing backtest tests assert.evaluate-signalsworkflow itself is unchanged.The six live signals under this accounting (run 34326465568 on this branch, bars through 2026-09-08)
Three stopped, three open, mean R −0.57 on six signals; the fills differ from the reported entries by under 1 %.
Test plan
ruff --select E,F,W --line-length 120clean, 141 tests pass locallyevaluate-signalsworkflow run from this branch (34326465568)testsworkflow on this PR🤖 Generated with Claude Code