pam ▸ docs/generated/ralph_loop_2026-03-16_replay_ticker_concentration.md
updated 2026-03-28
Ralph Loop 2026-03-16: Replay Ticker Concentration Gate
Change
Added replay concentration metrics to the shared research evaluation path:
top_tickertop_ticker_action_counttop_ticker_sharetop_two_ticker_share
These metrics now flow through:
research/run_replay.pyresearch/search.pyresearch/continuous_loop.pyresearch/status.pyresearch/discord_status.py
The confidence gate now blocks ticker-clustered replays with:
research_loop.max_top_ticker_shareresearch_loop.max_top_two_ticker_share
Default bounds:
max_top_ticker_share: 0.5max_top_two_ticker_share: 0.85
Why
The persisted replay currently reports non-zero actions, but they are not diversified signal:
72actions3unique tickers- top ticker share
0.5 - top two ticker share
0.9861
Without an explicit concentration check, repeated actions on one or two names can look stronger than they are.
Validation
Focused tests:
pytest -q tests/test_research_search.py tests/test_research_status.py
Result:
13 passed in 0.62s
Replay smoke check:
python3 - <<'PY'
from research.run_replay import run_replay
summary = run_replay('research/replay_rows.jsonl', 'research/strategy.py')
print(summary)
PY
Observed:
ReplaySummary(strategy_name='strategy', score=0.0193, avg_realized_bps=1.3889, hit_rate=0.0139, action_count=72, unique_tickers=3, top_ticker='KXPERSONPRESFUENTES-45', top_ticker_action_count=36, top_ticker_share=0.5, top_two_ticker_share=0.9861, total_rows=1280)
Status smoke check:
python3 main.py research-status
Relevant line:
- current persisted replay: rows=1280 score=0.0193 hit_rate=0.0139 actions=72 tickers=3 top=KXPERSONPRESFUENTES-45 top_share=0.5 top2_share=0.9861
Outcome
This improves replay evaluation quality by making ticker-clustered sleeves visible and confidence-gated instead of letting raw action count overstate signal quality.