Extract moving average functions