stock-bot/docs/development/backlog/tasks/RP18.md

6.2 KiB
Raw Blame History

RP18 — Complete a bounded October multi-session research pilot

Parent E12. Priority P1. Complexity M. Dependencies RP02, RP03, R08 and R09. Status remains in_progress until execution, independent reconciliation and web reopening are accepted. Root owns pilot artifacts and execution; independent review can run against frozen captures and completed results without writing research state.

Authorization: the owner's current “commit and continue” follows the recommended longer pilot. Reuse the already approved SMA version a67fb31d-7d13-4337-91fb-b49745983160, artifact 008a42dc373168ba17d5e73a1cc769de6b0bc24b7e487f07a422ceaa3618aa71. Verify its current catalog eligibility. Catalog approval is version-scoped (canonical-research.service.ts:240, strategy-catalog.service.ts:476); this continuation does not fabricate a new review event or broaden the historical October 1 approval record. A changed or unavailable version is a blocker.

Frozen input: dataset 9624ee17fd1b7f7b6787226a004704c5c92461355734a6b01891079816ec8e4b, 1,794 unchanged AAPL.US five-minute bars across 23 October 2024 regular sessions. October 1 is warmup; trading runs October 2–31. Source preparation has 25,297 independent assertions and an exact repeated actual API preview. Root visually verified the Nasdaq calendar has no October closure or early-close markers. These establish preparation evidence, not completed research execution.

Scope: use the existing declared-session preparation, immutable catalog, retained dataset, durable Rust runner, reproduction, chronological validation, cost experiment and evidence APIs. Preserve append-only intent/receipt custody in .data/research-pilots/aapl-202410-month/; retries reuse original bodies, keys and saved IDs. Only this pilot's new research records may be written. No source-history changes, application refactor, new strategy, simulator, optimizer, framework, paper/live activation or activation of any of the seven deferred tasks.

The exact predeclared plan is retained at .data/research-pilots/aapl-202410-month/predeclared-plan.json, SHA256 1f5a9d9c9d0cc88f950104121366dbb3af60ab8e2db00dd550b8cceff6380024, before any runs. Freeze the following nine unique runs before reading results. Date ranges below are inclusive regular-session dates, implemented with exact session-open/session-close instants in America/New_York.

Runs Parameters and policy Trading dates Warmup
1 baseline + 1 exact reproduction SMA fast 3 / slow 8 October 2–31 October 1
2 training candidates Fast 2 or 4; slow 8 October 2–11 October 1
1 validation Frozen training winner October 14–18 October 11
1 test Same frozen winner October 21–31 October 18
3 cost scenarios Fixed baseline SMA 3/8, independent of winner October 2–31 October 1

Selection: highest training total return, with lowest candidate index breaking ties. Freeze the winner before holdout execution. Each phase starts a fresh account; do not compound phase returns or tune parameters, windows or costs after inspecting results. No extra trials beyond the nine retained run identities; stop and report unexpected failures or scope changes.

Financial policy remains the RP02 policy: initial capital USD 10,000, owner budget 1,000, seed 42, fee rate 0.001, half-spread 0.0001, slippage 0.0001, latency 0, participation 0.01, order/position quantity caps 10, symbol/gross exposure caps 1,500, daily loss cap 100, drawdown cap 200, mark age 300,000 ms, 252 periods/year and zero annual risk-free rate. Cost scenarios are the retained baseline, fee/slippage 0/0, and fee/slippage 0.002/0.0005; half-spread remains 0.0001 in all three. They are scenario assumptions, not calibrated execution costs.

Acceptance and mandatory checks:

  • Exactly nine completed run identities; saved submission replay creates no duplicates. Record original source, parent/phase dataset, strategy artifact, engine/build, configuration and result hashes. Reproduction matches baseline economic hashes/results exactly.
  • Independently reconcile cash, owned positions, terminal equity, fees applied once and risk limits from retained requests, events/fills and results. Keep policy identical except the declared cost changes. Lower costs need not preserve fills or imply monotonic returns.
  • Training alone determines the frozen winner; validation/test use that version and parameter set. Verify the phase datasets contain only their declared warmup/trading windows and that warmup creates no trades.
  • Verify complete session-open return-period counts: baseline/reproduction/costs 21, each training candidate 7, validation 4, test 8. The terminal close is a visible partial period excluded from periodic statistics; report the actual sampling and sample sizes without claiming close-to-close returns or significant risk estimates.
  • Save an evidence-linked finding referencing the exact runs/validation/cost results, with separate hypothesis and observed evidence. Reopen the saved run, trades, chronological report, costs and finding through the existing web application and APIs.
  • Independent reviewer accepts provenance, accounting, selection, period counts, limitations and absence of unintended records. Root records execution IDs, results and any unavailable evidence in real-data-research.md before marking the manifest done.

Limits are frozen in .data/research-pilots/aapl-202410-month/evidence.json: retrospective asset/window selection; 2026 capture without historical vendor arrival/vintage evidence; assumed zero-delay bar-end availability; inferred rather than certified action-free coverage; scenario costs; independent phase accounts; and a small single-asset sample that cannot establish alpha, regime robustness or statistically meaningful out-of-sample superiority. Boundary markers remain in raw captures and are outside explicit half-open sessions; selected bars are never coerced or post-filtered.

Regression risk: confusing preparation with execution, duplicating submissions after interruption, changing the winning rule after results, or treating valid metadata as certified market evidence. Existing RP02/RP03/R08/R09 behavior is retained; no new application tests or performance work are required unless execution exposes a concrete defect.