Sentiment & AI
Sentiment + Momentum: Signal Fusion in Practice
A single trading signal is a probabilistic bet. A well-constructed pair of uncorrelated signals is a filter. The distinction matters for strategy performance in a way that is often underestimated at the design stage.
When you combine a news sentiment signal with a price momentum signal — each with modest individual accuracy — the combined condition fires less often, but fires with higher precision. The trades you do not take, because only one signal fired, are a significant portion of the false positives you would have otherwise executed. This article covers why that works, how to implement it in Python, and how to reason about threshold tuning and signal weighting when one source of information is more reliable than the other.
Why Single Signals Fail
Price momentum is a real edge. The empirical evidence for intermediate-term momentum across equities is well-established. Stocks that have outperformed over the past 3 to 12 months continue to outperform at rates above chance over the following weeks. But the edge is not clean. Momentum signals trigger false positives on low-volume moves, on sector rotations that drag correlated positions higher, and on mean-reverting setups that look like momentum at entry but reverse sharply within days.
The false positive rate in a naive momentum strategy is substantial — frequently 40 to 50% of signals in realistic backtests. Most of those false positives are not catastrophic individually, but cumulatively they erode the Sharpe ratio. Each false positive is a round-trip cost: spread, commission, and a small adverse move before the strategy exits. At high signal frequency, this overhead is material.
News sentiment signals have a different failure mode. A sentiment signal can fire accurately — the news is genuinely positive, the model read it correctly — but the price does not respond for hours or days. The market may already have priced the information. The news may be positive but not positive enough relative to elevated expectations. The sector may be in a regime where fundamental information is being discounted in favor of macro-level risk-off behavior. A sentiment signal that fires prematurely, before any price confirmation, produces a loss even when the information was correctly interpreted.
These two failure modes are largely independent. Momentum fails on low-volume noise moves where no new information exists. Sentiment fails on correctly-scored information events where price has not yet responded. They are not the same condition, which is exactly what makes combining them useful.
For a broader view of how information-driven moves differ from price noise, the earlier article on news sentiment in algo trading covers the structural reasons sentiment-blind strategies break down around high-impact events.
The Math of Signal Combination
The core claim of signal fusion is that combining two modestly accurate independent signals produces a more accurate combined signal. The probability math makes this concrete.
Suppose a momentum signal is correct 55% of the time — a small but real edge above chance. Suppose a sentiment signal is also correct 55% of the time independently. If the two signals are uncorrelated (they fail for different reasons, on different types of moves), then the probability that both fire correctly at the same time is higher than either alone:
When both signals agree, you are selecting a subset of events where two independent pieces of evidence point the same direction. If each signal's error rate is independent, the probability that both are wrong simultaneously is lower than the probability that either is wrong alone. The combined signal fires less frequently — you are applying a stricter filter — but the trades that do fire have a higher expected accuracy.
The formal result: if signal A has accuracy p_A and signal B has accuracy p_B, and their errors are independent, then P(both correct | both fire) is higher than either p_A or p_B individually. The AND-gate condition — requiring both signals to agree — trades reduced frequency for improved precision.
In practice, sentiment and momentum signals are not perfectly uncorrelated. Strong earnings beats produce both strong sentiment scores and strong short-term momentum. The two signals are partially correlated for the best-quality setups, which is acceptable — it means the filter does not eliminate those high-conviction entries. The benefit of the AND-gate comes from filtering out the large class of moderate-momentum moves with no information backing, and the class of early sentiment signals that have not yet produced price movement.
Defining the AND-Gate
The AND-gate condition requires both signals to exceed their respective thresholds before a position is taken. Neither signal alone is sufficient for entry.
For a long entry: the sentiment score must be at or above a positive threshold (e.g., +0.4) AND the price momentum over a lookback window must be at or above a positive threshold (e.g., +3%). Both conditions must hold simultaneously. A strong sentiment score with flat momentum does not trigger. Strong momentum with weak or negative sentiment does not trigger.
For a short entry: the sentiment score must be at or below a negative threshold AND momentum must be at or below a negative threshold. Both signals pointing the same negative direction are required.
The threshold values determine the frequency-versus-precision tradeoff. Higher thresholds mean fewer signals fire, but those that fire have higher individual precision. Lower thresholds mean higher frequency with more false positives included. Threshold selection should be empirical — determined by backtesting over a representative historical period — rather than set arbitrarily. The right thresholds vary by instrument, by sector, and by the volatility regime.
Python Implementation
The following function implements the AND-gate signal logic using Newsvibe sentiment scores and price-based momentum:
import pandas as pd
def sentiment_momentum_signal(
prices: pd.Series,
sentiment_scores: pd.Series, # Newsvibe score -1 to +1
momentum_window: int = 20,
sentiment_threshold: float = 0.4,
momentum_threshold: float = 0.03
) -> pd.Series:
momentum = prices.pct_change(momentum_window)
signal = pd.Series(0, index=prices.index)
# Long: both sentiment positive AND momentum positive above thresholds
long_condition = (sentiment_scores >= sentiment_threshold) & (momentum >= momentum_threshold)
# Short: both sentiment negative AND momentum negative
short_condition = (sentiment_scores <= -sentiment_threshold) & (momentum <= -momentum_threshold)
signal[long_condition] = 1
signal[short_condition] = -1
return signal
The function takes two aligned pd.Series — a price series and a sentiment score series — and returns a signal series with values 1 (long), -1 (short), or 0 (flat). Both input series must share the same index (typically a DatetimeIndex aligned to your bar frequency).
Threshold tuning. The sentiment_threshold and momentum_threshold parameters control when each signal is considered active. A sentiment_threshold of 0.4 means only sentiment scores at +0.4 or higher trigger a long — scores in the near-neutral band (-0.3 to +0.3) are ignored. A momentum_threshold of 0.03 means the 20-period return must be at least +3% for momentum to confirm. Start with conservative thresholds and lower them only if backtesting shows that lower-quality signals contribute positive expectancy.
Weighting when one signal is more reliable. The AND-gate treats both signals as equal — both must clear their threshold before entry. If you have evidence that one signal is consistently more reliable than the other — say, sentiment confidence is high but momentum lookback is short — you can implement a soft weighting rather than a hard AND-gate. A weighted sum combines the two signal strengths: signal_score = (w_s * normalized_sentiment) + (w_m * normalized_momentum) where weights sum to 1.0 and entry fires only above a combined threshold. This allows a very strong sentiment signal to partially compensate for a weaker momentum reading, at the cost of reintroducing some false positives that the hard AND-gate would have excluded.
AND-gate versus weighted sum. The hard AND-gate is more conservative and performs better when both signals are genuinely independent and you are optimizing for precision over frequency. The weighted sum is preferable when the signals are partially correlated (they tend to fire together) and you want to capture the continuum of signal strength rather than a binary threshold. For most retail systematic traders starting with signal fusion, the AND-gate is the correct starting point — it is easier to audit, easier to explain, and less prone to over-optimization.
Comparing Individual vs Fused
The Sharpe ratio improvement from signal fusion comes primarily from the reduction in false positive rate, not from improvement in the true positive rate.
Running momentum alone over a representative backtest period typically produces a Sharpe ratio in the range of 0.6 to 0.9 for a well-constructed equity momentum strategy. The false positive rate is the primary drag — many signals that trigger do not follow through, producing a series of small losses that offset the larger gains on true positive trades.
Adding the sentiment AND-gate condition reduces signal frequency substantially — often by 40 to 60%. The trades that are filtered out are disproportionately the low-quality momentum signals: breakouts with no news backing, sector-rotation-driven moves with ambiguous fundamental context. When backtested on the fused signal, the resulting Sharpe ratio is typically in the range of 1.1 to 1.6 — an improvement driven by the denominator (reduced volatility of returns from fewer false positive losses) rather than by larger individual wins.
Running sentiment alone produces a different profile: lower frequency, higher average per-trade expectancy on trades that fire after strong information events, but erratic timing that makes position sizing difficult. The momentum condition adds a price confirmation filter — the sentiment signal does not trigger an entry until the price is already moving in the predicted direction, which reduces premature entries and improves average holding-period returns.
These numbers are illustrative, not guaranteed. Actual Sharpe improvement depends on the instruments traded, the historical period, and the quality of both signal implementations. The directional claim — fused signals outperform individual signals on risk-adjusted terms — is consistent with published academic research on signal combination in factor investing.
The Oyamori Approach
Multi-signal architecture is a first-class design principle in Oyamori, not an optional add-on. The platform is built around the assumption that no single signal is sufficient for reliable automated execution, and that combining orthogonal signals is the correct approach for reducing false positive rates at scale.
Newsvibe integrates directly into this architecture. Sentiment scores are available as a first-class signal dimension alongside price momentum, volume signals, and technical pattern signals. A strategy built on the Oyamori platform can express AND-gate conditions natively — requiring sentiment above a threshold before a technically-triggered entry fires — without writing custom fusion logic in the execution layer.
The signal payload from Newsvibe includes the fields needed to implement threshold conditions precisely: score for the directional sentiment value, confidence for filtering ambiguous signals, urgency for time-sensitivity weighting, and tier for quality-gating. A strategy can specify tier >= 3 AND confidence >= 0.7 AND score >= 0.4 as its sentiment entry condition and receive only the signals that clear all three filters simultaneously. This is the AND-gate implemented at the data layer rather than in strategy code, which reduces the amount of custom fusion logic required in each individual strategy.
The practical result is that strategies built on Newsvibe integration fire fewer signals than pure-technical equivalents, but execute at higher average conviction. Over time, this is the correct tradeoff for automated execution where each trade carries a real cost.
Algorithmic trading carries substantial risk. This article is educational, not investment advice.
Next: How Newsvibe Works →