Skip to content

feat(rules,agent): funded paper-forward enablement - #139

Merged
eaitbrahim merged 1 commit into
mainfrom
feat/funded-paper-forward
Jul 24, 2026
Merged

feat(rules,agent): funded paper-forward enablement#139
eaitbrahim merged 1 commit into
mainfrom
feat/funded-paper-forward

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

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 --force

The lifecycle is candidate→paper→live, and promote re-runs the backtest gate (min_trades=100). A low-frequency trend-follower's backtest yields far fewer than 100 trades, so it can never enter paper status via the gate — yet the whole point of a paper-forward is to accrue the out-of-sample trades the backtest can't. --force advances one lifecycle step directly (via repo.update_rule_status), with a loud warning + rules.promote_forced log event. Analogous to the existing seed --status live gate-bypass. No-op on live/disabled. Non-force path unchanged.

  • New public helper promotion.next_status(status).

2. starting_equity_usd as a funding override for the paper seed

_seed_paper_account_if_needed seeded the paper account from real mark-to-market equity, using starting_equity_usd only as a broker-failure fallback. Now: starting_equity_usd > 0 funds the paper account at that amount (a deliberately-funded rehearsal, no broker read needed); == 0 keeps the real-equity default. Committed config.yaml value stays 0 — 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==0 still seeds from real equity. Full suite 1480 passed (+12), ruff clean.

🤖 Generated with Claude Code

- 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>
@eaitbrahim
eaitbrahim merged commit 56423e1 into main Jul 24, 2026
1 check passed
@eaitbrahim
eaitbrahim deleted the feat/funded-paper-forward branch July 24, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant