What is time series analysis? Patterns, models and forecasting
Time series analysis studies observations recorded over time. Learn about trends, seasonality, stationarity and how to evaluate forecasts without leakage.
Time series analysis studies observations recorded in time order, such as monthly inflation, daily electricity demand or quarterly GDP. It asks how a series changes, which patterns persist and how much information the past provides about the future. Unlike a list of unrelated observations, the sequence matters.
The same data can support different questions. Describing last year's inflation is a summary. Predicting next quarter's inflation is forecasting. Estimating what a monetary-policy decision caused requires a research design beyond the fact that one event followed another.
What makes time series different?
A value today may depend on earlier values. A shop's sales this week can resemble last week's sales, while December may resemble earlier Decembers. This dependence affects both model choice and how uncertainty is calculated.
First establish the frequency and meaning of the time index. A missing month is different from a month with zero sales. Monthly totals are different from end-of-month stocks. A change from quarterly to monthly reporting cannot be repaired simply by repeating each quarterly number three times.
Panel data add another dimension: several units followed over time. A country's unemployment series and unemployment across the same countries every quarter require different data structures, even though both include dates.
Trend, seasonality and unexpected movement
Three features are useful starting points:
- Trend: a sustained change in the level, such as a growing customer base.
- Seasonality: a pattern repeating at a calendar frequency, such as higher heating demand each winter.
- Irregular movement: variation left after the systematic components, including unusual shocks.
Consider this hypothetical shop record:
| Month | Previous year sales | Current year sales |
|---|---|---|
| January | 100 | 110 |
| February | 80 | 88 |
| March | 120 | 132 |
Sales fall 20% between January and February in each year. Yet every current-year month is 10% above the corresponding previous-year month. “Sales are falling” and “sales are growing” describe different comparisons. With only three months, this illustration cannot establish a stable seasonal pattern; several cycles would be needed to investigate one.
Why stationarity matters
Many time-series methods work with a process whose statistical behaviour is stable over time. Weak stationarity means a constant mean and variance, with covariance depending on the gap between observations rather than their calendar dates. Trends and changing volatility can violate these conditions.
Differencing replaces a level with its change: if a hypothetical index moves from 100 to 106 to 109, its consecutive changes are 6 and 3. This can help with some forms of nonstationarity, but it changes the question from levels to changes. It is not an automatic repair for every series. Hyndman and Athanasopoulos discuss these choices in stationarity and differencing.
Two unrelated persistent series can produce a convincing-looking regression, with a high R-squared and misleading conventional tests. Granger and Newbold's spurious-regression paper is a classic warning. Long-run relationships may instead require a cointegration framework; see the cointegration reference.
Evaluate forecasts in time order
A forecast must use only information that was available when it would have been made. Randomly mixing earlier and later observations can leak future information into training.
For a hypothetical monthly series from 2018–2025, fit an initial model through December 2023 and evaluate forecasts during 2024. Use successive earlier forecast origins to compare candidate models, then reserve 2025 for a final evaluation. Recreate transformations and variable selection inside each training window. Revised economic data need extra care: today's historical series may differ from the release available at the forecast date.
Choose the horizon that matches the decision. One-month-ahead accuracy does not establish twelve-month-ahead accuracy. Compare against a simple benchmark, such as the latest value or the same month last year. Report prediction intervals as well as point forecasts. The forecasting evaluation chapter explains training/test separation, accuracy measures and rolling-origin evaluation.
Choose a model after defining the question
ARIMA models describe serial dependence; vector autoregressions model several interacting series; volatility models describe changing conditional variance. These are different tasks, not interchangeable upgrades.
Start with a time plot, a defensible target and a benchmark. Read the ARIMA method page, unit-root reference or VAR/VECM reference for assumptions and implementation boundaries. A more elaborate model earns its place through useful evidence, including performance on observations it did not fit.
References
- Hyndman, R. J. and Athanasopoulos, G. Forecasting: Principles and Practice, 3rd ed. ARIMA models: stationarity and differencing.
- Hyndman, R. J. and Athanasopoulos, G. Forecasting: Principles and Practice, 3rd ed. The forecaster's toolbox.
- Granger, C. W. J. and Newbold, P. (1974). Spurious regressions in econometrics. Journal of Econometrics, 2(2), 111–120. Publisher record.