I am working on our 2025 Q3/Q4 forecasts, but our 2023 data has several gaps due to a CRM migration error. How do you all handle missing values in a time-series dataset? I'm worried that using a simple mean will flatten our seasonal peaks and lead to understocking during the holidays. Should I use linear interpolation or something more advanced like K-Nearest Neighbors?
3 answers
For seasonal data, a simple mean is definitely a bad idea because it ignores the "cycle" of your business. I would recommend using "Seasonal Decomposition" to impute the missing values. This method looks at the trend and the seasonality of the surrounding years to estimate what those missing points likely were. If you have similar products, you can also use "Cross-sectional Imputation." Whatever you do, make sure to run a sensitivity analysis afterward to see how much your forecast changes based on different imputation methods before finalizing the stock orders.
Have you checked if there is a correlation with a secondary metric, like website traffic, that wasn't lost during the migration?
If the gaps are small, linear interpolation is usually fine, but for large gaps in seasonal data, you really need a model-based approach like MICE.
I agree, Maria. Multiple Imputation by Chained Equations (MICE) is much more robust for complex datasets with significant missingness.
Kevin, that is a brilliant idea! Our Google Analytics data is completely intact for that period. I can use the web traffic as a proxy to estimate the sales volume for those missing weeks. By building a simple regression between traffic and sales from the "good" data periods, I should be able to reconstruct the missing sales data with much higher confidence than just using a generic interpolation. Thanks for the "out of the box" thinking on this one!