Volatility Indicators

Average True Range (ATR)

fast_ta.volatility.ATR(high : np.array, low : np.array, close : np.array, n : int = 14) → np.array

Compute the Average True Range (ATR) Indicator.

Parameters:
  • high (np.array) – High Time Series
  • low (np.array) – Low Time Series
  • close (np.array) – Close Time Series
  • n (int) – Period
Returns:

Average True Range (ATR) Indicator

Return type:

np.array

Bollinger Bands (BOL)

fast_ta.volatility.BOL(close : np.array, n : int = 20, ndev : float = 2.0) → np.array

Compute the Bollinger Bands (BOL) Indicator.

Parameters:
  • close (np.array) – Close Time Series
  • n (int) – Period
  • ndev (int) – Standard Deviation Factor
Returns:

Bollinger Bands (BOL) Indicator

Return type:

np.array

Donchian Channel (DC)

fast_ta.volatility.DC(high : np.array, low : np.array, n : int = 14) → np.array

Compute the Donchian Channel (DC) Indicator.

Parameters:
  • high (np.array) – High Time Series
  • low (np.array) – Low Time Series
  • n (int) – Period
Returns:

Lower, Middle, and Upper Donchian Channel (DC) Indicators

Return type:

np.array

Keltner Channel (KC)

fast_ta.volatility.KC(high : np.array, low : np.array, close : np.array, n1 : int = 14, n2 : int = 10, num_channels : int = 1) → np.array

Compute the Keltner Channel (KC) Indicator.

Parameters:
  • high (np.array) – High Time Series
  • low (np.array) – Low Time Series
  • close (np.array) – Close Time Series
  • n1 (int) – EMA Period
  • n2 (int) – ATR Period
  • num_channels (int) – Number of Bands In Each Direction Around EMA
Returns:

Keltner Channel (KC) Indicator Lines

Return type:

np.array