Commit Graph
2 Commits
Author SHA1 Message Date
cbazzaandClaude Sonnet 4.6 4e45db967b fix: core module review fixes (signal scoring, ML, session filter, telegram, MT filter)
enhanced_signal_scoring.py:
- mt -> mt5, add logging module, replace print() with logger
- Remove no-op df['tick_volume'] = df['tick_volume'] line
- Fix RSI division-by-zero: loss.replace(0, nan) + fillna(100)

ml_signal_predictor.py:
- Remove global warnings.filterwarnings('ignore') suppression
- Fix bare except -> except Exception with logger.warning
- Add note: default data files excluded from git, need manual export
- Add pickle security warning comment

session_confidence_filter.py:
- Move imports to file top, add logging + functools.wraps
- Remove repeated AdaptiveRhythmManager() per-call instantiation
- Add functools.wraps to preserve wrapped function metadata
- Document that extended_top_down_v2_adaptive is notebook-only
- Replace print() with logger, pass **kwargs through wrapper

telegram_notifier.py:
- Remove network call from __init__ -> explicit test_connection() method
- Add logging module, replace all print() with logger calls
- Narrow exception type: Exception -> requests.RequestException
- Remove unused imports (timedelta)
- notify_trade_entry/exit now return bool from send_message

multi_timeframe_regime_filter.py:
- Change debug default from True to False in wrapper to avoid verbose production output

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 10:12:25 +02:00
cbazza ce197c06f4 Implement session-specific confidence thresholds (NY Fine-Tuning)
FEATURE: Session-Specific Confidence Thresholds
- Asian: >=95% Confidence (unchanged, 97.8% WR)
- NY: >=97% Confidence (NEW, improves WR from 43.3% to 56.5%!)
- London/Overlap: Blocked (as before)

EXPECTED IMPACT:
- Eliminates 7 poor NY trades (all <97% confidence)
- NY Win-Rate: 43.3% → 56.5% (+13.2 pp)
- NY Profit: $1,418 → $1,655 (+$237)
- Total Profit: $8,306 → $8,598 (+$292)
- Overall Win-Rate: 67.8% → ~71%

IMPLEMENTATION:
1. session_filter_patch.py
   - Added session_confidence_thresholds config
   - New function: get_session_confidence_threshold()
   - New function: is_confidence_sufficient()

2. session_confidence_filter.py (NEW)
   - Wrapper for execute_trade_v2_adaptive
   - Session-specific confidence checks
   - Test suite (6/6 tests passed )

3. analyze_ny_session.py (NEW)
   - Detailed NY session analysis
   - Simulations for different thresholds
   - Data shows 97-98% trades had 100% WR

TESTING:
All 6 test cases passed:
- Asian 96%: ALLOWED 
- Asian 94%: BLOCKED 
- NY 98%: ALLOWED 
- NY 96%: BLOCKED 
- London 99%: BLOCKED 
- Overlap 99%: BLOCKED 

NEXT STEPS:
1. Integrate wrapper into notebook
2. Restart kernel
3. Monitor for 1 week
4. Review performance improvement

FILES:
- session_filter_patch.py: Updated config + new functions
- session_confidence_filter.py: Wrapper implementation
- analyze_ny_session.py: Analysis tool
- NY_SESSION_FINETUNING.md: Complete documentation
2025-12-26 17:46:58 +01:00