Files
foxhunt/crates
jgrusewski ea57ed3d86 fix: hold enforcement moved before execute_trade — eliminates undo pattern
Training kernel now has same order as backtest:
  decode → trailing_stop → hold_enforcement → execute_trade → mark_to_market

Previously hold ran AFTER execute_trade and undid it by resetting
position/cash from ps[]. Now hold modifies target_position BEFORE
execute_trade, so the trade sees the correct target and no undo is needed.

This eliminates the last train/eval order-of-operations mismatch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 09:07:48 +01:00
..