Skip to content

Blinded replay: named vs blind A/B (#140) - #147

Merged
sudoTomas merged 1 commit into
mainfrom
feat/blind-replay
Nov 3, 2026
Merged

sudoTomas merged 1 commit into
mainfrom
feat/blind-replay

Conversation

@sudoTomas

Copy link
Copy Markdown
Owner

Closes #140 (PRD #145).

  • replay --blind (API/MCP/CLI): ticker → ASSET_A, dates → bar t-k, prices indexed to 100, sizes/P&L as % of Sleeve; the model's % notional is mapped back to dollars before the book, so RiskGuard, stop, band and costs run unchanged. Live prompts untouched.
  • Sources whose free text names the asset (macro view, briefs) are dropped; fred, sentiment score and held position are rebuilt from numbers. New Sources are dropped by default until whitelisted.
  • scripts/replay_blind_compare.py run|score, with a --control arm (named, same Sources dropped) so memory = control − blind, separate from the lost Sources.
  • 931 tests; a scan test proves no ticker, company, date, time or $ amount reaches any blind prompt.

https://claude.ai/code/session_01UDNLNu854ULHbHSL59UJKu

A replay option `blind` (service, API, MCP, CLI) renders every prompt the
run sends (decide, desk analysts, critic, the Confirm, the exit-review
block) without the ticker (per-run alias ASSET_A), calendar dates
(relative bar labels) or dollar values (price index with the run's first
bar = 100; positions, P&L and sizes as % of the Sleeve). The response
contract is unchanged: notional_usd is read as % of the Sleeve and the
harness maps it back to dollars after the desk and before the crude book,
so the stop, min hold, no-trade band and costs run unchanged.

Free-text Sources (Macro View, briefs) are dropped, not scrubbed; FRED,
X sentiment (score only) and the held position re-render from numbers.
The run summary records the dropped Sources. A prompt variant that names
the symbol is refused for a blind run. Each step now records the intent
the book acted on.

scripts/replay_blind_compare.py runs each Bot's symbols named and blind
over one window (optionally a named-control arm with the same Sources
dropped) and scores net P&L, hit rate, opens and the gap per symbol and
per Bot. Live prompts are unchanged.

Claude-Session: https://claude.ai/code/session_01UDNLNu854ULHbHSL59UJKu
@sudoTomas
sudoTomas merged commit fc895f2 into main Nov 3, 2026
1 check passed
@sudoTomas
sudoTomas deleted the feat/blind-replay branch November 3, 2026 03:47
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.

Blinded replay: named vs blind A/B

1 participant