Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Our Stock people have asked us to look at using EWMA instead of a 3 Month Average within our Stock Management Suite.
Does anyone have experience of using this method within QlikView / can provide a QVW example of how it works?
Many thanks in advance to anyone who can help.
Regards
Paul
Hi All, found the following:
The EWMA algorithm requires a decay factor, alpha. The larger the alpha, the more the average is biased towards recent history. The alpha must be between 0 and 1, and is typically a fairly small number, such as 0.04. We will discuss the choice of alpha later.
The algorithm works thus, in pseudocode:
There are special-case behaviors for how to initialize the current value, and these vary between implementations. One approach is to start with the first value in the series; another is to average the first 10 or so values in the series using an arithmetic average, and then begin the incremental updating of the average. Each method has pros and cons.
I suppose the best thing for me to do is create a function - any pointers?