Commit Graph

2 Commits

Author SHA1 Message Date
jgrusewski
65d92644d6 fix(rl): asymmetric trail win threshold 100% → 25% of initial_r
The winner-ratchet condition (unrealized > initial_r) never fired
because typical price moves rarely exceed 100% of the initial stop
distance. Win/loss ratio measured at 1.01× (symmetric) despite the
asymmetric decay being active.

Fix: ISV-driven threshold factor (slot 546, default 0.25). Trail
starts ratcheting when profit reaches 25% of initial_r — much more
achievable. At 25%: a $12.50 initial_r only needs $3.12 profit
before the winner-tracking activates.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 20:59:44 +02:00
jgrusewski
29640b6e6d feat(rl): asymmetric trail + session risk — structural P&L edge
Two structural mechanics that produce asymmetric win/loss ratio
without the agent needing to learn the behavior:

1. Asymmetric trail decay (rl_asymmetric_trail_decay.cu):
   - LOSING: trail *= 0.995/step (halves in 139 steps = 35s)
   - WINNING beyond initial_r: trail = max(trail, profit × 0.5)
   - NEUTRAL: unchanged (proving zone)
   Produces: small/quick losses, large/extended wins.

2. Session risk circuit breaker (rl_session_risk_check.cu):
   - Tracks EMA of realized PnL (α=0.02, slow)
   - When EMA < -$50: blocks ALL opening actions
   - Prevents tilt — a losing streak stops the agent from digging deeper

Pipeline order: action selection → confidence gate → FRD gate →
session risk → min_hold → asymmetric trail → trail_mutate →
trail_stop → heat_cap → actions_to_market_targets

ISV slots 537-541. RL_SLOTS_END → 542.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 19:53:54 +02:00