emmanuelakbi commited on
Commit
eb4ef03
·
1 Parent(s): 1d4dd5c

Add deterministic sanity-fix for Strategist's runaway prices

Browse files

The 14B Strategist occasionally emits wild numbers at synthesis time
(e.g. a $50 000 target on a $290 stock, or stop on the wrong side of
entry). Rather than surface those to the user, the parser now runs
_sanity_fix_prices after extracting the fields: if a stop/target is
more than 20 percent away from the entry or sits on the wrong side of
entry for the BUY/SELL direction, replace it with a conservative
default derived arithmetically from the entry (±3 percent for stop,
±5 percent for target). Valid prices pass through untouched.

1 file changed +82 -2
crew/signals.py+82-2