generalized moving averages