Volume

Volume Indicators — Require volume data to measure buying and selling pressure.

Functions

AD — Chaikin A/D Line ADOSC — Chaikin A/D Oscillator OBV — On Balance Volume OBV_SMOOTHED — OBV followed by SMA or EMA CMF — Chaikin Money Flow EMV — Ease of Movement FORCE_INDEX — Elder’s Force Index NVI — Negative Volume Index NVI_WITH_EMA — NVI plus EMA signal PVI — Positive Volume Index PVI_WITH_SIGNAL — PVI plus moving-average signal VOLOSC — Percentage volume oscillator VROC — Volume rate of change KVO — Klinger Volume Oscillator PVT — Price-Volume Trend RVOL — Relative volume

ferro_ta.volume.AD(high, low, close, volume)[source]

Chaikin A/D Line.

Parameters:
  • high (array-like) – Sequence of high prices.

  • low (array-like) – Sequence of low prices.

  • close (array-like) – Sequence of closing prices.

  • volume (array-like) – Sequence of volume values.

Returns:

Cumulative A/D Line values.

Return type:

numpy.ndarray

ferro_ta.volume.ADOSC(high, low, close, volume, fastperiod=3, slowperiod=10)[source]

Chaikin A/D Oscillator.

Parameters:
  • high (array-like) – Sequence of high prices.

  • low (array-like) – Sequence of low prices.

  • close (array-like) – Sequence of closing prices.

  • volume (array-like) – Sequence of volume values.

  • fastperiod (int, optional) – Fast EMA period (default 3).

  • slowperiod (int, optional) – Slow EMA period (default 10).

Returns:

Array of ADOSC values; leading slowperiod - 1 entries are NaN.

Return type:

numpy.ndarray

ferro_ta.volume.CMF(high, low, close, volume, timeperiod=20)[source]

Chaikin Money Flow.

Rolling sum of CLV × volume divided by rolling sum of volume.

Parameters:
  • high (ArrayLike)

  • low (ArrayLike)

  • close (ArrayLike)

  • volume (ArrayLike)

  • timeperiod (int)

Return type:

ndarray

ferro_ta.volume.EMV(high, low, volume, timeperiod=14, divisor=10000.0)[source]

Ease of Movement (Arms).

Parameters:
  • high (ArrayLike)

  • low (ArrayLike)

  • volume (ArrayLike)

  • timeperiod (int)

  • divisor (float)

Return type:

ndarray

ferro_ta.volume.FORCE_INDEX(close, volume, timeperiod=13)[source]

Elder’s Force Index.

timeperiod=1 returns the raw (close - prev) * volume series.

Parameters:
  • close (ArrayLike)

  • volume (ArrayLike)

  • timeperiod (int)

Return type:

ndarray

ferro_ta.volume.KVO(high, low, close, volume, fastperiod=34, slowperiod=55, signalperiod=13)[source]

Klinger Volume Oscillator and signal line.

Parameters:
  • high (ArrayLike)

  • low (ArrayLike)

  • close (ArrayLike)

  • volume (ArrayLike)

  • fastperiod (int)

  • slowperiod (int)

  • signalperiod (int)

Return type:

tuple[ndarray, ndarray]

ferro_ta.volume.NVI(close, volume)[source]

Negative Volume Index, seeded at 1000.

Parameters:
  • close (ArrayLike)

  • volume (ArrayLike)

Return type:

ndarray

ferro_ta.volume.NVI_WITH_EMA(close, volume, timeperiod=255)[source]

Negative Volume Index plus its EMA signal.

Parameters:
  • close (ArrayLike)

  • volume (ArrayLike)

  • timeperiod (int)

Return type:

tuple[ndarray, ndarray]

ferro_ta.volume.OBV(close, volume)[source]

On Balance Volume.

Parameters:
  • close (array-like) – Sequence of closing prices.

  • volume (array-like) – Sequence of volume values.

Returns:

Cumulative OBV values.

Return type:

numpy.ndarray

ferro_ta.volume.OBV_SMOOTHED(close, volume, timeperiod=20, matype=1)[source]

On-Balance Volume smoothed with a moving average.

Parameters:
  • close (array-like)

  • volume (array-like)

  • timeperiod (int, optional) – Smoothing period (default 20).

  • matype (int, optional) – 0 = SMA, 1 = EMA (default), matching MA.

Return type:

ndarray

ferro_ta.volume.PVI(close, volume)[source]

Positive Volume Index, seeded at 1000.

Parameters:
  • close (ArrayLike)

  • volume (ArrayLike)

Return type:

ndarray

ferro_ta.volume.PVI_WITH_SIGNAL(close, volume, timeperiod=255, matype=1)[source]

Positive Volume Index plus a moving-average signal.

Parameters:
  • close (ArrayLike)

  • volume (ArrayLike)

  • timeperiod (int)

  • matype (int)

Return type:

tuple[ndarray, ndarray]

ferro_ta.volume.PVT(close, volume)[source]

Price-Volume Trend.

Parameters:
  • close (ArrayLike)

  • volume (ArrayLike)

Return type:

ndarray

ferro_ta.volume.RVOL(volume, timeperiod=20)[source]

Relative volume: volume / SMA(volume).

Parameters:
  • volume (ArrayLike)

  • timeperiod (int)

Return type:

ndarray

ferro_ta.volume.VOLOSC(volume, fastperiod=5, slowperiod=10)[source]

Percentage volume oscillator: 100 * (fast SMA - slow SMA) / slow SMA.

Parameters:
  • volume (ArrayLike)

  • fastperiod (int)

  • slowperiod (int)

Return type:

ndarray

ferro_ta.volume.VROC(volume, timeperiod=25)[source]

Volume rate of change.

Parameters:
  • volume (ArrayLike)

  • timeperiod (int)

Return type:

ndarray