Volatility

Volatility Indicators — Measure the magnitude of price fluctuations.

Functions

ATR — Average True Range NATR — Normalized Average True Range TRANGE — True Range

ferro_ta.volatility.ATR(high, low, close, timeperiod=14)[source]

Average True Range.

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

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

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

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

Returns:

Array of ATR values; leading timeperiod - 1 entries are NaN.

Return type:

numpy.ndarray

ferro_ta.volatility.NATR(high, low, close, timeperiod=14)[source]

Normalized Average True Range.

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

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

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

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

Returns:

Array of NATR values (percentage); leading timeperiod - 1 entries are NaN.

Return type:

numpy.ndarray

ferro_ta.volatility.TRANGE(high, low, close)[source]

True Range.

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

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

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

Returns:

Array of True Range values.

Return type:

numpy.ndarray