exponential_moving_average#

exponential_moving_average(*, column: DataColumn, days: int) DataColumn[source]

Calculate the Exponential Moving Average (EMA) over a specified period.

Based on a smoothing factor of 2/(days+1). Resets the calculation on missing data.

Parameters:
  • column – Data for which the EMA is calculated.

  • days – The span for the EMA. It specifies that the “center of mass” of the EMA’s weights is roughly at the same point as an SMA of the same length in days.

Returns:

EMA values as a DataColumn.

Return type:

DataColumn