public class MovingAverageByExtension
This implements a moving average filter with these properties:
1) both past and future observations are used in smoothing;
2) the head is prepended with the first element in the inputs (x_t = x_1 for t < 1);
3) the tail is appended with the last element in the inputs (x_t = x_n for t > n).
When the filter length is even, more of the filter is forward in time than backward.
Note that both past as well as future values are used in generating the outputs.
Be cautious to use this in a forecasting model.