Hello Devs,

I believe there is a bug in the Exponential Smoothing code. Using the example from Makridakis, Wheelwright, Hyndman, “Forecasting Methods and Applications,” 3e, table 4-3 on page 151, we should get,

When running the same in GRETL using

for each series, we get

When displayed we get,

To get the same MSE as Makridakis we need,

? printf "MSE for SES1 is: %9.3f\n", sum((ship-ses1(-1))^2)/10
MSE for SES1 is: 3438.332
? printf "MSE for SES2 is: %9.3f\n", sum((ship-ses2(-1))^2)/10
MSE for SES2 is: 4347.237
? printf "MSE for SES3 is: %9.3f\n", sum((ship-ses3(-1))^2)/10
MSE for SES3 is: 5039.368

The calculated EMAs are correct, but need to be lagged.

Which provides a graph that matches their figure 4-7