Skip to content
Open RaamTrade

VolumeROC — Volume Rate of Change

Percentage change in volume over N bars. The participation spike that confirms a breakout — or its absence, which is the more useful signal: a new high on volume 40% below normal is a different event from one on double volume.

Signature

VolumeROC(period, on=<source>)
Argument Type Required Notes
period int Param or literal Yes Lookback. Default 14, bounds 1–400.
on= symbol No Source symbol. Defaults to the trade symbol. Reads volume.

Formula

$$ \text{VROC} = 100,\frac{V_t - V_{t-n}}{V_{t-n}} $$

Warmup

period + 1 bars; 0 until then, and 0 if the reference bar had no volume.

Reading the value

vroc.value
vroc > 50

Example

class VolumeSpike(Strategy):
"""Only take breakouts accompanied by a volume surge."""
trade = Symbol()
sizing = FixedCapital()
def execute(self):
vroc = VolumeROC(14, on=self.trade)
dh = DonchianHighTrue(20, on=self.trade)
if self.trade.close >= dh.value_at(1) and vroc.value > 50 and self.trade.is_flat:
self.buy(self.trade, reason=f"Breakout, volume +{vroc.value:.0f} pct")
if self.trade.close < dh.value * 0.97 and self.trade.is_long:
self.sell(self.trade, self.trade.position, reason="Failed break")

Notes

  • The standard rate-of-change construction applied to volume.
  • Compares against one bar n back, so it inherits that bar’s noise. RelativeVolume compares against an average and is steadier.