Simple exponential smoothing keeps a level , starting from ; the one-step-ahead forecast for is .
Implement:
ses(y, alpha) returning (levels, sse) where sse is the sum of squared one-step-ahead errors for fit_alpha(y, grid) returning the alpha in grid with the smallest SSE (first wins ties)