trading/tests/services/kevin_signal_bridge
Viktor Barzin 52b3c76482 feat(kevin): correct exits, realized P&L, wire exit scanner
- executor: EXIT/SELL signals close the FULL held broker position (not a target_dollars-sized fresh order) and skip when flat

- executor: book realized P&L on the closing trade ((fill - avg_entry)*qty) so the dashboard P&L + win-rate populate; entries leave pnl=None

- exit scanner: wired into the bridge run loop on kevin_bridge_exit_scan_cron (daily ET gate; croniter intentionally not a dependency) plus an offsetting-SELL guard so it only emits exits for currently-held tickers

[ci skip]

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 22:13:30 +00:00
..
__init__.py feat(kevin_bridge): main orchestrator with dependency injection 2026-05-24 00:59:56 +00:00
test_aggregator.py test(kevin): fix enum assertion + mark Postgres-dependent tests as integration 2026-05-26 20:01:37 +00:00
test_audit.py test(kevin): fix enum assertion + mark Postgres-dependent tests as integration 2026-05-26 20:01:37 +00:00
test_blocklist.py feat(kevin_bridge): blocklist + daily risk counters 2026-05-24 01:01:54 +00:00
test_cursor.py feat(kevin_bridge): exit-scan daily job + cursor + audit writer 2026-05-24 01:03:53 +00:00
test_exit_scanner.py feat(kevin): correct exits, realized P&L, wire exit scanner 2026-06-04 22:13:30 +00:00
test_exit_scanner_guard.py feat(kevin): correct exits, realized P&L, wire exit scanner 2026-06-04 22:13:30 +00:00
test_main.py feat(kevin): correct exits, realized P&L, wire exit scanner 2026-06-04 22:13:30 +00:00
test_risk_counters.py feat(kevin_bridge): blocklist + daily risk counters 2026-05-24 01:01:54 +00:00