Introduction to Time Series Forecasting: Scope, Challenges, and Roadmap
Time series forecasting is the process of predicting future values of a variable based on its past observations, where the temporal order of data points is a critical component of the analysis. This seemingly simple definition belies the profound complexity and ubiquitous importance of forecasting in modern decision-making systems, from anticipating electricity demand to predicting financial market movements. Unlike conventional predictive modeling tasks that often rely on cross-sectional data and assume independence among observations, time series data exhibit intrinsic temporal dependencies—autocorrelations, trends, and seasonal patterns—that must be explicitly modeled to generate accurate and reliable predictions. The stakes are high: a 10% error in a retail demand forecast can lead to millions in lost sales or excess inventory, while a slight misestimation in pandemic spread models can result in inadequate healthcare preparedness. This chapter lays the groundwork for the entire book by defining the scope of time series forecasting, distinguishing it from related predictive tasks, enumerating its core challenges, and providing a detailed roadmap of the material covered in subsequent chapters.
What is Time Series Forecasting?
At its core, a time series is a sequence of data points collected or recorded at successive points in time, typically at uniform intervals. Formally, let $\{X_t\}_{t=1}^T$ denote a univariate time series observed at times $t=1,2,\dots,T$. The forecasting problem is to estimate the future values $X_{T+1}, X_{T+2}, \dots, X_{T+h}$ for some horizon $h \geq 1$, given the historical observations. This definition encompasses a wide variety of data characteristics: the series may be univariate (single variable) or multivariate (multiple interrelated variables), equally spaced or irregularly sampled, continuous or discrete, and measured on various scales. The unifying theme is that time ordering imposes a causal structure—past values can influence future values, but not vice versa—which fundamentally shapes the modeling approach.
Time series forecasting differs from other forms of prediction primarily in its treatment of temporal dependence. In supervised learning with cross-sectional data, we typically assume that observations are independent and identically distributed (i.i.d.), allowing us to randomly split data into training and test sets. In time series, however, the i.i.d. assumption is almost always violated due to autocorrelation: the value at time $t$ is often correlated with values at times $t-1, t-2,$ etc. This violates the independence assumption and necessitates specialized techniques for model evaluation (e.g., rolling-window cross-validation instead of random splits) and modeling (e.g., lagged features, state-space models). Moreover, time series often exhibit non-stationarity—their statistical properties such as mean, variance, and autocorrelation structure change over time—which requires careful preprocessing or modeling choices to avoid spurious inferences.
The forecasting task can be categorized along several dimensions:
- **Horizon**: short-term (e.g., next hour), medium-term (e.g., next month), or long-term (e.g., next year).
- **Granularity**: fine-grained (e.g., minute-level) vs. aggregated (e.g., weekly).
- **Frequency**: high-frequency (tick data), daily, monthly, quarterly, annual.
- **Data type**: continuous (temperature), count (number of calls), binary (event occurrence), or compositional (percentages summing to 100%).
These dimensions influence the choice of methods: high-frequency data may require specialized models for volatility clustering; sparse count data may call for Poisson or negative binomial models; long-horizon forecasts often rely on scenario analysis or judgmental adjustments.
Distinguishing Time Series Forecasting from Other Predictive Tasks
While time series forecasting shares common ground with regression and classification, its temporal nature introduces unique considerations that set it apart.
Versus Standard Regression
In standard regression, we model a response variable $y$ as a function of predictors $\mathbf{x}$, assuming that the pairs $(\mathbf{x}_i, y_i)$ are independent. The goal is to estimate the conditional expectation $E[y|\mathbf{x}]$. In time series forecasting, the predictors often include lagged values of the target itself (autoregressive terms) and possibly other time series (exogenous variables). The independence assumption fails because the observations are ordered in time, and the error terms are typically autocorrelated. For example, a simple linear regression of $X_t$ on $X_{t-1}$ is an autoregressive model of order 1 (AR(1)), but its error term $\epsilon_t$ may still be autocorrelated if the true process is higher-order. Thus, time series models must explicitly account for the correlation structure in the residuals, often through moving average terms or state-space representations.
Another distinction lies in the evaluation. In cross-sectional regression, we can randomly hold out a test set. In time series, the temporal order must be preserved: we train on an initial segment and test on a later segment to simulate real-world forecasting. This leads to time-series cross-validation schemes like rolling-origin evaluation, where the training window moves forward in time, providing multiple test points. This approach respects causality and avoids look-ahead bias.
Versus Classification
Classification predicts discrete class labels. Time series classification (TSC) is a related but distinct problem: given labeled time series (e.g., ECG recordings labeled as normal or arrhythmic), classify new series. TSC treats the entire series as a single instance and focuses on pattern recognition across the series length. In contrast, time series forecasting predicts future values of a single series, often recursively using past values. However, the two can be combined: one might forecast future values and then classify based on the forecasted trajectory (e.g., predicting a stock's price movement direction). Moreover, probabilistic forecasting can produce predictive distributions that inform classification decisions under uncertainty.
Versus Clustering and Anomaly Detection
Clustering groups similar time series (e.g., clustering product demand patterns), while anomaly detection identifies unusual points or patterns within a series. Both are unsupervised or semi-supervised tasks that do not necessarily involve predicting the future. Nevertheless, they often serve as preprocessing steps for forecasting: clustering can identify groups of series with similar dynamics for hierarchical forecasting; anomaly detection can clean data before model fitting.
The Unique Role of Time
The temporal dimension introduces causality and irreversibility: the past influences the future, but not conversely. This causal directionality restricts the information set available at prediction time—we can only use data up to the forecast origin. It also implies that models must be adapted to non-stationarity, as the data-generating process may evolve over time due to regime shifts, structural breaks, or gradual changes. Furthermore, time series data often exhibit long-range dependencies where observations far apart in time remain correlated, challenging models that assume short-memory processes.
Ubiquitous Applications: Where Forecasting Makes an Impact
Time series forecasting is not merely an academic exercise; it is a cornerstone of operational planning across virtually every sector of the economy and scientific endeavor. The breadth of applications underscores its necessity and the diversity of challenges it presents.
Finance and Economics
In finance, forecasting underpins risk management, algorithmic trading, and portfolio allocation. Stock price prediction, despite the efficient market hypothesis, remains a heavily researched area, with practitioners seeking to fo