Files
foxhunt/crates
jgrusewski 04cc2a323c feat: spread-aware tx cost, confidence scaling, profit-taking bonus
Three new reward intelligence features, all zero-state GPU-native:

1. Spread-aware transaction costs: tx_cost scales by CUSUM volatility.
   Trading in choppy markets costs more — teaches the model to reduce
   frequency in volatile regimes. Real spread DOES widen with volatility.

2. Kelly-inspired confidence scaling: when realized_pnl > 0 (model has
   been right), amplify PnL weight 1.5x. When losing, amplify drawdown
   penalty 1.5x. Self-reinforcing: good decisions → stronger signal →
   better Q-values. Bad decisions → defensive mode → more exploration.

3. Profit-taking bonus: +0.1 reward when model reduces a position toward
   flat while cumulative episode PnL is positive. Explicitly rewards the
   ACT of taking profit, not just being in a winner. Teaches the model
   to lock in gains rather than riding them back to breakeven.

Total kernel additions: ~20 lines, ~10 FLOPs. Zero extra state beyond
what PORTFOLIO_STRIDE=12 already provides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 22:34:50 +01:00
..