Key Takeaways: Chapter 25

Time Series Analysis and Forecasting


  1. Time series data has its own rules, and the most important one is: information flows forward in time, never backward. You cannot randomly shuffle temporal data, you cannot use future values to predict past ones, and you cannot evaluate a forecasting model with standard k-fold cross-validation. Every modeling and evaluation decision must respect the temporal ordering of observations. Violating this produces optimistically biased metrics that do not reflect real forecasting performance.

  2. Decomposition is always the first step. Breaking a time series into trend, seasonality, and residual components reveals the structure that your model needs to capture. Use additive decomposition when seasonal fluctuations have constant absolute magnitude; use multiplicative decomposition when they scale proportionally with the series level. If the residuals after decomposition still show patterns, you have not captured all the structure.

  3. Stationarity is the assumption that makes classical time series models work. A stationary series has constant mean, constant variance, and autocorrelation that depends only on the lag distance, not on time. The ADF test checks for stationarity. First differencing removes linear trends; seasonal differencing removes seasonal patterns. If your series is non-stationary, apply differencing until the ADF test passes before fitting ARIMA.

  4. ACF and PACF plots diagnose the autocorrelation structure and guide ARIMA parameter selection. A slowly decaying ACF with a sharp PACF cutoff at lag p suggests an AR(p) model. A sharp ACF cutoff at lag q with a slowly decaying PACF suggests an MA(q) model. Both decaying gradually suggests ARMA. These rules are guidelines, not laws --- use auto_arima for automated selection and verify with diagnostic checks on the residuals.

  5. ARIMA(p,d,q) is the classical workhorse for univariate time series, and SARIMA adds seasonal components. The parameters control autoregressive terms (p), differencing order (d), and moving average terms (q). SARIMA adds (P,D,Q,m) for seasonal AR, seasonal differencing, seasonal MA, and the seasonal period. For monthly data with annual patterns, m=12. For daily data with weekly patterns, m=7. Getting the seasonal period right is critical.

  6. Prophet is designed for practitioners who need a decent forecast without becoming time series statisticians. Prophet handles missing data, detects changepoints automatically, models multiple seasonalities, and incorporates holidays and known events. It requires far less manual tuning than ARIMA. Use Prophet when: you have messy real-world data, multiple seasonalities, known events to model, or a non-technical audience that needs interpretable component plots.

  7. Walk-forward (temporal) cross-validation is mandatory for honest evaluation. Train on all data up to time T, forecast the next h steps, record the errors, advance the training window, repeat. Use TimeSeriesSplit from scikit-learn or Prophet's built-in cross_validation function. Always report the range of results across folds, not just the average --- a model with 3% average MAPE and folds ranging from 1% to 8% is less reliable than one with 4% average and folds ranging from 3% to 5%.

  8. Forecasts degrade with horizon length, and this degradation must be communicated honestly. A 1-month-ahead forecast is always more accurate than a 6-month-ahead forecast. Report accuracy at multiple horizons so stakeholders understand the reliability of short-term vs. long-term projections. For planning beyond 3 months, recommend periodic re-forecasting rather than a single long-range projection.

  9. Always communicate prediction intervals, not just point forecasts. A forecast of "7.2% churn next month" is less useful than "7.2% churn, with a 95% interval of 6.0% to 8.4%." Uncertainty quantification lets business stakeholders plan for the range of outcomes, not just the expected case. For budget and resource planning, the upper bound of the interval is often more important than the point estimate.

  10. For complex multivariate time series, ARIMA and Prophet are insufficient --- and that is fine. These tools handle univariate and simple multivariate forecasting well. For problems with dozens of interacting time series, non-linear cross-variable dynamics, or very high-frequency data, deep learning approaches (LSTM, Transformer-based models) are the next step. But the concepts from this chapter --- stationarity, autocorrelation, temporal cross-validation --- are prerequisites for those methods too.


If You Remember One Thing

You cannot randomly split time series data. This single rule --- so simple to state, so frequently violated --- is the foundation of everything in this chapter. It determines how you engineer features (no future leakage), how you validate models (walk-forward, not k-fold), how you report accuracy (by forecast horizon, not as a single number), and how you deploy (retrain on all available history, forecast forward). ARIMA and Prophet are useful tools, but they are secondary to getting the evaluation right. A mediocre model with honest temporal evaluation beats a sophisticated model with leaky cross-validation every time, because only the first one tells you the truth about how your forecasts will perform when they face real, unknown future data.


These takeaways summarize Chapter 25: Time Series Analysis and Forecasting. Return to the chapter for full context.