Skip to main content

Rate Of Change

Quick Reference

PropertyValue
Dimensionsignal
Categorymomentum
Versionv1.0
Output Columnrate_of_change

Rate of change: (price_t - price_{t-window}) / price_{t-window} 鈥?percentage price momentum

Formula

diff(price, window) / shift(price, window)

CDM Inputs

ColumnCDM TableDescription
pricecdm_trade_enrichedTrade data enriched with bar context 鈥?price, volume, side, trade type

Parameters

ParameterTypeDefaultDescription
windowinteger20Lookback window in milliseconds

Output

Column: rate_of_change

Percentage price change over window

Market Intuition & Trading Rationale

Rate of change measures percentage price momentum: (price[t] - price[t-n]) / price[t-n]. It's the simplest momentum measure 鈥?the total return over the lookback window. Positive ROC means price has risen (bullish). Negative ROC means price has fallen (bearish). The percentage formulation makes ROC comparable across instruments 鈥?a 1% ROC means the same thing for a $10 stock and a $1000 stock. Used in intraday_momentum, realized_volatility_spectrum, and volatility_regime_transition packs.

Usage Cases

  • Multi-timescale momentum: Compute ROC at multiple windows for a complete momentum profile. Trade when all horizons agree on direction.
  • Trend strength: |ROC| > 2% 鈫?strong trend. |ROC| < 0.5% 鈫?weak/range-bound. Adjust position sizes accordingly.
  • Divergence: Price making new highs but ROC declining 鈫?bullish momentum weakening. Price making new lows but ROC rising 鈫?bearish momentum weakening.

YAML Definition

name: rate_of_change
description: 'Rate of change: (price_t - price_{t-window}) / price_{t-window}?percentage
price momentum'
category: momentum
dimension: signal
version: v0.9.0 (Beta)
required_inputs:
- price
output_column: rate_of_change
output_description: Percentage price change over window
tags:
- momentum
- signal
parameters:
window:
type: integer
description: Lookback window in milliseconds
required: false
default: 20
formula: diff(price, window) / shift(price, window)