On Wed, 23 Sep 2015, Raul Gimeno wrote:
By using the filter exponential moving average, you can choose the
first EMA value based on the mean of the first n observations. The
number is limited to 6. Why this limitation ? Sometimes I see people
taking the first value being the mean of half of the time series.
The general limitation is not 6 but T/4. I suppose we could increase
it to T/2 if that's commonly used.
Where do I see any information about the way it is calculated in the
Gretl
documentation ?
In the Help for the movavg() function. Also see
https://en.wikipedia.org/wiki/Moving_average ; we compute the Roberts
version.
I have a time series with mean = 351.2917 and the first observation
is y1 = 362
Gretl gives me correctly the first forecast being S0 = 351.2917 for
y1 which equals the mean of the whole time series.
The second forecast is given by Gretl as being 354.2625 with alpha =
0.1.
According to me you should get: S1 = 0.1(351.2917) + 0.9(362) =
352.3625
S_t = a*y_t + (1-a)*S_{t-1}
Using Roberts the second value of S should be 0.1 times the second y
observation + 0.9 times the initial value of S.
How to find the optimal alpha minimizing the MSE ?
You could use a line search in a loop, or one of gretl's numerical
tools such as BFGSmax.
Allin Cottrell