python - how do I compute a weighted moving average using pandas -


using pandas can compute

  • simple moving average sma using pandas.stats.moments.rolling_mean
  • exponential moving average ema using pandas.stats.moments.ewma

but how compute weighted moving average (wma) described in wikipedia http://en.wikipedia.org/wiki/exponential_smoothing ... using pandas?

is there pandas function compute wma?

no, there no implementation of exact algorithm. created github issue here:

https://github.com/pydata/pandas/issues/886

i'd happy take pull request this-- implementation should straightforward cython coding , can integrated pandas.stats.moments


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -