Time series interview questions
7 questions across 4 sections, in the order you would learn them. Every answer here is one that works — but an answer you have read is not an answer you can give, so use Test yourself and say it out loud first.
Data where order carries meaning
Read the section that teaches thisIf this comes up in an interview
Why can you not use ordinary cross-validation on a time series?
It shuffles, so future data ends up in training and past data in validation. Because consecutive points are correlated, the model effectively sees the answer and the score is excellent and meaningless. Use a forward-chaining split instead.
What is the first thing you do on a forecasting problem?
Compute the naive baseline: tomorrow equals today, or equals the same day last week. It is often hard to beat, and many forecasting projects never do without realising.
How do you build a rolling average feature safely?
Shift before rolling, so the window covers only past values. A rolling mean that includes the current row leaks the target and produces a model that cannot work in production.
Forecasting models, from simple to learned
Read the section that teaches thisIf this comes up in an interview
Would you use a neural network or a classical model for forecasting?
Start with classical baselines and a gradient-boosted model with lag features, which are fast, strong and interpretable on most business series. A neural network needs to beat those with evidence.
Why evaluate at multiple forecast horizons?
Error grows with the horizon, and an averaged single number hides how quickly accuracy decays. Evaluate at each horizon you will actually use.
Forecasting in code: baselines, backtests and intervals
Read the section that teaches thisIf this comes up in an interview
How would you evaluate a demand forecasting model?
Rolling-origin backtesting that trains only on the past and forecasts the real horizon, a seasonal naive baseline, a scale-free metric such as MASE so products of different volume compare, and interval coverage if the business uses ranges.
Then they push further
Your model beats the baseline on average but loses badly on promotions. What next?
Promotions are a known future event, so add them as features, including planned ones, and evaluate that slice separately. If data is thin, a separate adjustment for promotion periods may beat one global model.
Why not use mean absolute percentage error?
It is undefined or huge when actual values are near zero and penalises over- and under-forecasts asymmetrically. Scaled errors avoid both problems.
What gets marked up. Marked up for rolling backtests, a naive baseline, and a scale-free metric. Random train-test splits are marked down immediately.
Forecasting many series at once
Read the section that teaches thisIf this comes up in an interview
You need forecasts for 50,000 products, many with little history. How do you approach it?
A global model trained across all products with product, calendar and lag features, so short-history products borrow strength from similar ones. Reconcile across the product and store hierarchy, handle intermittent items specially, and backtest by segment.
These are the questions for one topic. The whole question bank covers every topic on the site.