Momentum — the absolute difference from period bars ago:
value − value[i − period]. Appends one column; undefined for the first
period rows (no look-back). period counts bars, so it's gap-correct
on a trading axis.
This is the additive companion to percentChange, which is the same
look-back as a ratio ((value / value[i − period] − 1) × 100, i.e. rate of
change). Momentum is in the units of the price, so it scales with it
and is not comparable across instruments at different price levels — reach
for percentChange when you want that.
Definition
TA-Lib's MOM, exactly: verified against it bar-for-bar in the oracle
fixture, with identical warm-up masks, at both periods tested. There is no
smoothing and no seed, so there is no definition delta to document.
Edges
A missing cell at either end of the look-back makes the difference
missing — nothing is invented across a gap.
A leading gap (another study's own warm-up) shifts the start by that
much and is otherwise unaffected.
Momentum — the absolute difference from
periodbars ago:value − value[i − period]. Appends one column;undefinedfor the firstperiodrows (no look-back).periodcounts bars, so it's gap-correct on a trading axis.This is the additive companion to percentChange, which is the same look-back as a ratio (
(value / value[i − period] − 1) × 100, i.e. rate of change). Momentum is in the units of the price, so it scales with it and is not comparable across instruments at different price levels — reach forpercentChangewhen you want that.Definition
TA-Lib's
MOM, exactly: verified against it bar-for-bar in the oracle fixture, with identical warm-up masks, at both periods tested. There is no smoothing and no seed, so there is no definition delta to document.Edges