ema
Calculate the Exponential Moving Average (EMA).
EMA is a cumulative calculation, including all data. Past values have a diminishing contribution to the average, while more recent values have a greater contribution. This method allows the moving average to be more responsive to changes in the data.
obb.technical.ema(data: Union[list, dict, pd.DataFrame, List[pd.DataFrame], pd.Series, List[pd.Series], numpy.ndarray, Data, List[Data]], target: str = close, index: str = date, length: int = 50, offset: int = 0)
Parameters
- Standard
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | List[Data] | The data to use for the calculation. | None | False |
| target | str | Target column name. | close | True |
| index | str | Index column name to use with data, by default "date" | date | True |
| length | int | The length of the calculation, by default 50. | 50 | True |
| offset | int | The offset of the calculation, by default 0. | 0 | True |
Returns
The calculated data.