News informational-only: gate sentiment bonus/penalty off by default
Add NewsConfig.sentiment_affects_signals (default False), gating the +5 aligned-sentiment confidence bonus and the 10-pt news_conflict penalty. With event_risk_caps_signals already False, live decisions are now pure technical, matching the backtester (use_news=False). Warnings and the sentiment display are unchanged. Adds a gating regression test. Claude-Session: https://claude.ai/code/session_01FMaaPdrrrQuh1VvGQH1icN
This commit is contained in:
@@ -1079,7 +1079,7 @@ class SignalAggregator:
|
||||
mtf_avg = sum(all_scores) / len(all_scores)
|
||||
score = score * 0.6 + mtf_avg * 0.4
|
||||
|
||||
if abs(report.news_sentiment) > 0.2:
|
||||
if self.config.news.sentiment_affects_signals and abs(report.news_sentiment) > 0.2:
|
||||
if (report.news_sentiment > 0 and score > 0) or \
|
||||
(report.news_sentiment < 0 and score < 0):
|
||||
confidence += 5
|
||||
@@ -1129,7 +1129,8 @@ class SignalAggregator:
|
||||
if (report.news_sentiment > 0 and score < -10) or \
|
||||
(report.news_sentiment < 0 and score > 10):
|
||||
report.warnings.append("News sentiment CONFLICTS with technical signal")
|
||||
penalties.append(("news_conflict", 10))
|
||||
if self.config.news.sentiment_affects_signals:
|
||||
penalties.append(("news_conflict", 10))
|
||||
|
||||
if report.event_risk == "caution":
|
||||
report.warnings.append(f"Upcoming event: {report.event_description}")
|
||||
|
||||
Reference in New Issue
Block a user