Regarding most of the rolling window indicators for example SMA,
Why isn't the previously calculated SMA Indicator used as an optimization similar to dynamic programming?
For e.g in SMA we only need to exclude the oldest period value in average and include the latest period value to calculate one additional point in SMA.
I see that most of the indicators are like this.
While we are running in "live" mode c-lib of ta-lib is excellent choice but during back-testing Performance gain by this will be huge by saving all the redundant computation.
This is specifically important, if the model and strategy is ML-based and is already resource intensive.
Basically we need to implement a python lib for indicators which re-uses its previous computations. (I checked and couldn't find something existing like this)
For e.g Gekko uses all of its previously computed indicator results in SMA, EMA, MACD, RSI etc.
Let me know your thoughts on this.
Regarding most of the rolling window indicators for example SMA,
Why isn't the previously calculated SMA Indicator used as an optimization similar to dynamic programming?
For e.g in SMA we only need to exclude the oldest period value in average and include the latest period value to calculate one additional point in SMA.
I see that most of the indicators are like this. While we are running in "live" mode c-lib of ta-lib is excellent choice but during back-testing Performance gain by this will be huge by saving all the redundant computation. This is specifically important, if the model and strategy is ML-based and is already resource intensive.
Basically we need to implement a python lib for indicators which re-uses its previous computations. (I checked and couldn't find something existing like this)
For e.g Gekko uses all of its previously computed indicator results in SMA, EMA, MACD, RSI etc. Let me know your thoughts on this.