Momentum trading – the art of riding the coattails of prevailing price trends – is a cornerstone of many trading playbooks. The old adage “the trend is your friend” often holds true. But what if we could find a way to befriend trends that have a bit more… conviction? Many traders believe that significant price moves accompanied by a surge in trading volume carry more weight, signaling stronger participation and belief in the direction.1 This leads to a pertinent question: Can filtering momentum signals with relative volume spikes lead to more robust trading decisions?
This article explores a strategy called “Relative-Volume Spike Momentum,” which attempts to do just that. We’ll break down its components, look at how it can be implemented, and then brainstorm other ways to harness the power of volume in momentum trading.
The core idea is simple: we first identify a price momentum signal and then check if this signal is accompanied by a significant increase in trading volume relative to its recent average. Only if both conditions are met do we consider a trade.
The strategy uses the Price Rate of Change (ROC) to gauge momentum. ROC measures the percentage change in price over a specific lookback period. A positive ROC above a certain threshold suggests bullish momentum, while a negative ROC below a threshold indicates bearish momentum.
To confirm the momentum, we look at Relative Volume (RVOL). This is calculated by comparing the current day’s trading volume to its recent average (e.g., a 20-day Simple Moving Average of volume).2 A “spike” is identified if the current volume is significantly higher than this average – for instance, 1.5 or 2 times greater.
The calculate_indicators
function from the provided
strategy shows how these are computed:
Python
# --- 2. Calculate Indicators ---
def calculate_indicators(df):
print("Calculating indicators (ROC, Relative Volume)...")
# 1. Price Momentum (Rate of Change)
df['Price_ROC'] = (df['Close'] / df['Close'].shift(MOMENTUM_ROC_WINDOW)) - 1
# 2. Relative Volume (RVOL)
# Using daily volume as a proxy for "intraday" conviction spikes
df['Volume_SMA'] = df['Volume'].rolling(window=VOLUME_SMA_WINDOW, min_periods=1).mean()
# Calculate RVOL, handle potential division by zero if Volume_SMA is 0
df['RVOL'] = np.where(
df['Volume_SMA'] > 0, # Condition
df['Volume'] / df['Volume_SMA'], # Value if true
0 # Value if false (or np.nan, then handle)
)
df.dropna(subset=['Price_ROC', 'RVOL'], inplace=True) # Drop rows with NaNs
print("Indicators calculated.")
return df
Here, MOMENTUM_ROC_WINDOW
(e.g., 7 days in the provided
code) and VOLUME_SMA_WINDOW
(e.g., 7 days) are key
parameters.
A trade is initiated only when both conditions align:
This filtering mechanism is implemented in the
run_backtest
function:
Python
# Excerpt from run_backtest function for entry signal generation:
# (roc_prev, rvol_prev are from iloc[i-1])
# momentum_signal_long = roc_prev > MOMENTUM_BUY_THRESHOLD
# momentum_signal_short = roc_prev < MOMENTUM_SELL_THRESHOLD
# volume_spike_confirm = rvol_prev > RVOL_SPIKE_THRESHOLD
# Long Entry Condition: Momentum AND Volume Spike
if momentum_signal_long and volume_spike_confirm:
df.loc[df.index[i], 'Signal'] = 1 # Signal for entry at current day's open
# Short Entry Condition: Momentum AND Volume Spike
elif momentum_signal_short and volume_spike_confirm:
df.loc[df.index[i], 'Signal'] = -1
The parameters MOMENTUM_BUY_THRESHOLD
,
MOMENTUM_SELL_THRESHOLD
, and
RVOL_SPIKE_THRESHOLD
(e.g., 2.0 in the code, meaning volume
must be twice its recent average) are critical for tuning the strategy’s
sensitivity.
The rationale for incorporating volume is that it can act as an indicator of conviction or participation.3
By filtering for volume spikes, the strategy aims to participate in moves that have stronger underlying support.
While the “Relative-Volume Spike Momentum” strategy provides a solid foundation, there are several ways to enhance or adapt this concept:
Instead of, or in addition to, Price ROC, consider:
MACD (Moving Average Convergence Divergence): Can provide smoother momentum signals and highlight changes in trend strength.5 Its histogram is often used for entry signals.
RSI (Relative Strength Index): While often used for overbought/oversold levels, RSI is fundamentally a momentum oscillator.6 An RSI value above 50 can indicate bullish momentum, and below 50, bearish.7
ADX (Average Directional Index): Measures trend strength (not direction).8 This could be a third filter: trade only if price momentum, volume, AND trend strength align.
The daily RVOL is a good proxy, but other volume indicators can offer deeper insights:
Volume Oscillators: Similar to the one used in
the provided strategy, but you could also compare two different SMAs of
volume directly (e.g.,
SMA(Vol, short) - SMA(Vol, long)
).
On-Balance Volume (OBV): A running total of volume, adding volume on up days and subtracting on down days.9 The trend of OBV can confirm price trends. A divergence between price and OBV can signal a potential reversal.10
Money Flow Index (MFI) or Chaikin Money Flow (CMF): These incorporate both price and volume to measure buying and selling pressure.11 Positive values generally indicate buying pressure.
Volume Profile / Volume At Price (VAP): More advanced techniques that show volume traded at specific price levels, highlighting areas of support and resistance.12 These often require more specialized tools or data.
The strategy description mentions “intraday relative-volume spikes.” The provided code uses daily RVOL. For a more direct implementation:
The current strategy filters trades – it’s an all-or-nothing based on the volume spike. An alternative approach is to weight trades:
5. Combining with Other Factors:
RVOL_SPIKE_THRESHOLD
. These need careful
testing and potential optimization.Adding a volume confirmation layer, like the Relative Volume Spike filter, to a momentum strategy is a logical step towards trying to identify higher-conviction moves. It’s an attempt to answer the question of whether a price move has broad participation and strength behind it.
While no single indicator or filter is a silver bullet, incorporating volume analysis thoughtfully can be a valuable addition to a trader’s toolkit. The strategy outlined provides a clear framework, and the ideas for alternative indicators and approaches offer rich avenues for further research and development. The quest to find signals backed by genuine market conviction continues!