JeffreySarnoff / RollingFunctions.jl

Roll a window over data; apply a function over the window.
MIT License
117 stars 7 forks source link

Feature request: TimeArrays support #22

Open StepanSushko opened 2 years ago

StepanSushko commented 2 years ago

It would be nnatural to run rolling functions on (multidimensional) time-series (TimeArrays in Julia) and get TimeArray back. Thanks in advance.

JeffreySarnoff commented 2 years ago

At present, this package expects Vectors and not higher dimensional arrays. How would you want to roll over a multidimensional time series?

StepanSushko commented 2 years ago

Sorry, for the late answer! I would implement for single column (dimension) TimeArray first, then I would add vectorization with ".", where each rolling function is applied to each column separately, and then summed into a TimeArray. Something like that.

kpa28-git commented 1 year ago

@StepanSushko I'm developing a fork of RollingFunctions you could check out: https://github.com/kevindirect/MapSlide.jl It supports operating on AbstractArray, not just vectors. It's still a WIP and there may be things that need to be improved, feedback or suggestions would be welcome!