Stats on expanding or moving data windows

I am coding up functions for means/std/corr/OLS on expanding/moving inclusion/moving exclusion windows. So far, a simple approach (mostly loops) seems to provide pretty nice performance.

My question: is this already done in a package?

RollingFunctions.jl is one example.

If you want something that eeks out even more performance you can use StaticKernels.jl as I started to do in my kitchen-sink package GitHub - tbeason/SantasLittleHelpers.jl: A package full of toys for me to use in my other programs. or I also have done some work using Tullio.jl and found it to be even faster.

Thanks. That looks interesting.

May I ask about your experience with StaticKernels.jl when the kernel gets “big”? For instance, if the moving data window includes 1_000 data points.

I would think that is too large for that approach. In this case, writing your own with Tullio.jl and LoopVectorization.jl will probably be the fastest.

I spent a day tooling around with the approach here: GitHub - tbeason/TullioStatistics.jl

Unfortunately, the rolling window stuff didn’t get completed in that day and I haven’t revisited it since… but I do remember that I had already tested rolling means, std, etc and it was much faster than the approach in RollingFunctions.jl.