ewm_mean_by
documented formula for the decay parameter is incorrect
#18377
Labels
documentation
Improvements or additions to documentation
Description
The formula supplied for$\alpha_i$ is currently incorrect. For small time intervals, it would imply that $\alpha_i$ is close to $1$ , so the ewm would be very close to the current value, which is not the expected behaviour of ewms. Instead, $\alpha_i = 1 - \exp(-\lambda (t_i - t_{i-1}))$ would yield the correct behaviour (and is indeed what is shown in
ewm_mean
documentation, as well aspandas
documentation forewm
).Link
https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.ewm_mean_by.html
The text was updated successfully, but these errors were encountered: