2

I'm trying to calculate the exponentially weighted rolling std of a time series using numpy. The equivalent in pandas would be pd.DataFrame(ts).ewm(...).std(). What's the way to go?

Edit

Possible solution: https://pypi.org/project/numpy-ext/

where one could use npext.rolling_apply(...), apply weights on the rolling window and then do std().

phibog
  • 21
  • 4
  • @ChrisA It's similar, but I'm specifically looking for exponential weighted moving std instead of exp weighted moving average. – phibog Apr 09 '19 at 08:51
  • Possible duplicate of [NumPy version of "Exponential weighted moving average", equivalent to pandas.ewm().mean()](https://stackoverflow.com/questions/42869495/numpy-version-of-exponential-weighted-moving-average-equivalent-to-pandas-ewm) – Matt Hall Apr 10 '19 at 06:27
  • @kwinkunks that question is misleadingly titled since it is really asking for a high performance way of doing that. – user3673 Oct 08 '20 at 17:08

0 Answers0