Files
autofirmer-expanded/lib
Brandon LiandClaude Opus 4.6 b7430df16e Rewrite computeDailyTarget with stage-first structure
Replaces the tangled first_day/consistency/min-day branches with a
cleaner flow:
1. If profit target met, coast on min-day (or nothing)
2. Compute cappedByFuture (reserve future min-days)
3. Compute consistencyCap:
   - Day 1 of cycle: remaining × consistency
   - Day 2+: current maxDay
   - 0/100% consistency: no cap
4. Combine and floor at minDayPnL when mandatory days remain

Fixes a bug where Stage 2+ Day 1 used the full profitTarget × consistency
instead of remaining × consistency, allowing day 1 to exceed 50% of
cycle-local profit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 19:47:26 -05:00
..
2026-03-07 22:07:02 -06:00