Best window length for a moving-average forecast
You forecast a slowly drifting quantity (say, a rolling mean that creeps up by per step) using the average of the last observations. Each observation carries noise of variance , and the drift is per step. A window of length has forecast error
where the first term is sampling noise and the second is the bias from averaging stale, out-of-date points.
What window length minimizes the forecast MSE?