pam ▸ docs/generated/ralph_loop_2026-03-16_live_research_sleeves.md
updated 2026-03-28

Ralph Loop 2026-03-16: Live Research Sleeves

Change

Bounded PRD 002 fix: research/search.py was already sweeping low-price politics and mid-price politics sleeve params, but research/strategy.py was not executing those paths. That made much of the search surface inert.

This loop:

  1. implemented live bounded sleeve decisions for: - politics contrarian low-price - politics process-watch low-price - politics mid-price reversal - economics band follow-through
  2. added sleeve-family provenance in decision["rationale"]
  3. extended focused research parity tests
  4. ran a bounded replay and search smoke on the current local replay rows

Why

This improves replay evaluation quality and dislocation sleeve quality without lowering the hard deployment gate. The sleeves remain research-only logic in research/strategy.py, while threshold-review gating for deployable ideas stays intact.

Validation

Tests

Command:

PYTHONPATH=. pytest -q tests/test_research_search.py

Result:

9 passed in 0.36s

Replay smoke

Command:

python3 research/run_replay.py --rows research/replay_rows.jsonl --strategy research/strategy.py --results /tmp/ralph_results.tsv --notes 'ralph_loop_process_mid_sleeves'

Result:

{
  "strategy_name": "strategy",
  "score": 0.0087,
  "avg_realized_bps": 0.9346,
  "hit_rate": 0.0093,
  "action_count": 107,
  "unique_tickers": 4,
  "total_rows": 1280
}

Search smoke

Command:

python3 research/search.py --rows research/replay_rows.jsonl --loops 20

Result:

{
  "loops": 20,
  "best_score": 0.0193,
  "baseline_score": 0.0087,
  "promoted": true,
  "promotion_reason": "improved_over_persisted_baseline",
  "best_loop": 2,
  "best_action_count": 72,
  "best_unique_tickers": 3
}

Promoted parameter changes on this replay file:

  1. process_watch_max_live_price: 0.02
  2. politics_midprice_max_live_price: 0.15

Files

  1. research/strategy.py
  2. tests/test_research_search.py
  3. research/README.md
  4. research/best_strategy_params.json