Time Series Forecasting
Projecting metrics like sales and demand with trend, seasonality, baselines, exponential smoothing and honest error measures.
Advanced · about 8 hours · difficulty 4/5
Learn first: Linear and Logistic Regression for Analysts, pandas for Data Analysis
Planning teams constantly ask analysts "what will next quarter look like?" Forecasting gives a structured, testable answer instead of a guess.
Understand the series first
- Trend: long-run increase or decrease.
- Seasonality: repeating patterns by week, month or year.
- Holidays and events: one-off spikes like sales events.
- Noise: what is left.
Plot the series and a decomposition before modelling anything.
Start with baselines
- Naive: next value equals the last value.
- Seasonal naive: next Monday equals last Monday.
- Moving average.
A fancy model that cannot beat these is not worth using.
Common methods
- Exponential smoothing (ETS / Holt-Winters): weights recent observations more, handles trend and seasonality. Built into Excel as
FORECAST.ETS. - ARIMA / SARIMA: models autocorrelation; available in statsmodels.
- Prophet: handles multiple seasonalities and holidays with little tuning.
- Regression with features: price, promotions and marketing spend as drivers.
Evaluate honestly
- Split by time: train on the past, test on the most recent period. Never shuffle.
- Measure error with MAE, RMSE or MAPE (careful with values near zero).
- Show prediction intervals, not just a single line.
Pitfall: presenting a single-line forecast with false precision. Communicate a range and the assumptions. You are ready to move on when you can forecast 12 weeks of a real series, beat a seasonal naive baseline on a holdout period, and chart the prediction interval.
Key concepts
- Trend, seasonality and decomposition
- Naive and seasonal naive baselines
- Exponential smoothing
- ARIMA and SARIMA
- Prophet
- Time-based train/test splits
- MAE, RMSE and MAPE
- Prediction intervals
Mini project
Forecast the next 12 weeks of a Kaggle store sales series using seasonal naive, Holt-Winters and one other method, and compare their MAE on the last 12 known weeks.
Check yourself
Why must a forecasting test set be the most recent period rather than a random sample?
Free resources
- Forecasting: Principles and Practice (free online) (Hyndman and Athanasopoulos)
- statsmodels documentation (statsmodels)
- Kaggle Learn: Time Series (Kaggle)