Adjust decay rate dynamically - Cross Validated most recent 30 from stats.stackexchange.com 2019-10-23T00:01:10Z https://stats.stackexchange.com/feeds/question/263064 https://creativecommons.org/licenses/by-sa/4.0/rdf https://stats.stackexchange.com/q/263064 2 Adjust decay rate dynamically Ron https://stats.stackexchange.com/users/149864 2017-02-20T22:59:29Z 2017-02-22T20:55:44Z <p>Say I have a stream of values $\langle s_1, s_2,\ldots\rangle$ coming in and a function</p> <p>$$E_{s_1:s_n}(t) = E_{s_1:s_{n-1}}(t-1) + \alpha\cdot (s_t-E_{s_1:s_{n-1}}(t-1))$$</p> <p>that compute their exponential moving average as the values flow in. </p> <p>I would like the alpha, i.e the decay rate, to adjust dynamically as a function of the last $h$ values we have seen. That is, if the trend is that the values are similar then I want my rate to plateau.</p> <p>Otherwise, if the trend is that the values are decreasing quickly, I would like the decay rate to be greater and vice-versa.</p> <p>Right now, I was thinking of defining:</p> <p>$$\alpha(s_{k-h}, s_{k-h-1}, \ldots , s_k) = E_{\Delta_{k-h}:\Delta_k}(t-1) + \alpha_\Delta \cdot ((s_k - s_{k-1}) - E_{\Delta_{k-h}:\Delta_k}(t-1))$$</p> <p>That is, the exponential moving average of the difference between two consecutive values of our time serie with an arbitrary alpha ($\alpha_\Delta$)</p> <p>I am not a statistician, just a student that tries to play with mathematics. Help is greatly welcomed, including links to resources that could help me solve this problem in a better fashion. I am completely open to new ideas!</p>