kama#

swordfish.function.kama()#

Calculate the Kaufman Adaptive Moving Average for X with a rolling window. The length of the window is given by the parameter window. The result is of the same length as X. The first (window-1) elements of the result are null values.

Parameters:
  • X (Constant) – A vector/matrix/table.

  • window (Constant) – A positive integer indicating the size of the sliding window.