@pond-ts/financial API Reference
    Preparing search index...

    Function momentum

    • 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.

      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.

      • 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.

      Type Parameters

      • S extends SeriesSchema
      • const Output extends string = "momentum"

      Parameters

      Returns TimeSeries<
          readonly [S[0], ValueColumnsForSchema<S>, OptionalNumberColumn<Output>],
      >