Add trade setup outcome tracking and performance stats
Closes the feedback loop on R:R scanner signals: - Nightly outcome_evaluator job replays unresolved setups against daily OHLCV bars: target_hit / stop_hit / ambiguous (same-bar, counted as loss) / expired after OUTCOME_EVALUATION_MAX_BARS (default 30) - Migration 004: evaluated_at + outcome_date on trade_setups - GET /trades/performance: hit rate, expectancy (avg R), total R with breakdowns by direction, recommended action, and confidence bucket - New Performance page (stat cards, breakdown tables, Evaluate Now, methodology disclosure) wired into sidebar and mobile nav - 17 new unit tests for evaluation logic and stats aggregation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,10 @@ FUNDAMENTAL_RATE_LIMIT_BACKOFF_SECONDS=15
|
||||
DEFAULT_WATCHLIST_AUTO_SIZE=10
|
||||
DEFAULT_RR_THRESHOLD=3.0
|
||||
|
||||
# Outcome Evaluation
|
||||
# Trading days before an undecided setup expires at 0R
|
||||
OUTCOME_EVALUATION_MAX_BARS=30
|
||||
|
||||
# Database Pool
|
||||
DB_POOL_SIZE=5
|
||||
DB_POOL_TIMEOUT=30
|
||||
|
||||
Reference in New Issue
Block a user