feat(rules,agent): funded paper-forward enablement - #139
Merged
Conversation
- rules promote --force: deliberate un-gated candidate->paper (or paper->live) step, for starting a paper-forward whose backtest can't reach the min_trades floor (analogous to `seed --status live`). - paper seed: config.paper.starting_equity_usd > 0 now funds the paper account at that amount (an explicitly-funded rehearsal), taking precedence over the real mark-to-market seed; 0 keeps the real-equity default. Co-Authored-By: Claude Opus 4.8 <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.
What
Two small, cohesive capabilities that together let us start a funded paper-forward of the 5-trend Turtle — the honest path to the n=100 out-of-sample evidence floor.
1.
keel rules promote --forceThe lifecycle is candidate→paper→live, and
promotere-runs the backtest gate (min_trades=100). A low-frequency trend-follower's backtest yields far fewer than 100 trades, so it can never enterpaperstatus via the gate — yet the whole point of a paper-forward is to accrue the out-of-sample trades the backtest can't.--forceadvances one lifecycle step directly (viarepo.update_rule_status), with a loud warning +rules.promote_forcedlog event. Analogous to the existingseed --status livegate-bypass. No-op onlive/disabled. Non-force path unchanged.promotion.next_status(status).2.
starting_equity_usdas a funding override for the paper seed_seed_paper_account_if_neededseeded the paper account from real mark-to-market equity, usingstarting_equity_usdonly as a broker-failure fallback. Now:starting_equity_usd > 0funds the paper account at that amount (a deliberately-funded rehearsal, no broker read needed);== 0keeps the real-equity default. Committedconfig.yamlvalue stays0— only the comment/docstrings changed.Tests (TDD)
12 new tests: force-promote candidate→paper with zero candles (backtest would never clear the floor), paper→live, no-op on live/disabled, the loud warning, non-force still gates; funding override wins over a broker reading real equity;
starting_equity_usd==0still seeds from real equity. Full suite 1480 passed (+12), ruff clean.🤖 Generated with Claude Code