joshday / OnlineStats.jl

⚡ Single-pass algorithms for statistics
https://joshday.github.io/OnlineStats.jl/latest/
MIT License
831 stars 62 forks source link

Feature Request: OnlineStat Chaining #272

Open femtotrader opened 8 months ago

femtotrader commented 8 months ago

Hello,

I'm looking for a way to "chain" 2 (or more) OnlineStat to do something like in the following examples

https://github.com/nardew/talipp/blob/main/tests/test_indicator_chaining.py

I wonder what is the best solution for that purpose using OnlineStats (and IncTA.jl)

I looked at OnlineStats doc but couldn't find that.

Some help will be very nice. After understanding it (and if we consider doc is still lacking stuff) I could provide PR.

Kind regards

joshday commented 7 months ago

I believe this existed in a very early version of OnlineStats, implemented by @tbreloff, but now it's gone for a reason I don't remember.

So there's nothing built-in that does this, although I've thought about re-implementing it. It would be straightforward to make your own OnlineStat that implements a specific chain.

I'll keep this open as a feature request, but probably won't have time to work on it soon.