Using pandas I can compute
- simple moving average SMA using
pandas.stats.moments.rolling_mean - exponential moving average EMA using
pandas.stats.moments.ewma
But how do I compute a weighted moving average (WMA) as described in wikipedia http://en.wikipedia.org/wiki/Exponential_smoothing … using pandas?
Is there a pandas function to compute a WMA?
No, there is no implementation of that exact algorithm. Created a GitHub issue about it here:
https://github.com/pydata/pandas/issues/886
I’d be happy to take a pull request for this– implementation should be straightforward Cython coding and can be integrated into
pandas.stats.moments