TigerData logo
TigerData logo
  • Product

    Tiger Cloud

    Robust elastic cloud platform for startups and enterprises

    Agentic Postgres

    Postgres for Agents

    TimescaleDB

    Postgres for time-series, real-time analytics and events

  • Docs
  • Pricing

    Pricing

    Enterprise Tier

  • Developer Hub

    Changelog

    Benchmarks

    Blog

    Community

    Customer Stories

    Events

    Support

    Integrations

    Launch Hub

  • Company

    Contact us

    About

    Timescale

    Partners

    Security

    Careers

Log InTry for free
TigerData logo

Products

Time-series and Analytics AI and Vector Enterprise Plan Cloud Status Support Security Cloud Terms of Service

Learn

Documentation Blog Forum Tutorials Changelog Success Stories Time-series Database

Company

Contact Us Careers About Brand Community Code Of Conduct Events

Subscribe to the Tiger Data Newsletter

By submitting, you acknowledge Tiger Data's Privacy Policy

2026 (c) Timescale, Inc., d/b/a Tiger Data. All rights reserved.

Privacy preferences
LegalPrivacySitemap

Copy as HTML

Open in ChatGPT

Open in Claude

Open in v0

I

By Ivan Despot

14 min read

Sep 08, 2022

General#CTA-ebookTime Series Data

Table of contents

01 Definition: Time-Series Forecasting02 Time-Series Forecasting Examples03 When Is Time-Series Forecasting Useful?04 What to Consider When You Do Time-Series Forecasting05 Time-Series Forecasting Techniques06 Time-Series Decomposition07 Time-Series Regression Models08 Exponential Smoothing09 ARIMA Models10 Neural Networks11 TBATS12 Conclusion

Time-Series Forecasting: Definition, Methods, and Applications

A time-series forecasting graph of taxicab pickup count in Times Square by time
General

I

By Ivan Despot

14 min read

Sep 08, 2022

Table of contents

01 Definition: Time-Series Forecasting02 Time-Series Forecasting Examples03 When Is Time-Series Forecasting Useful?04 What to Consider When You Do Time-Series Forecasting05 Time-Series Forecasting Techniques06 Time-Series Decomposition07 Time-Series Regression Models08 Exponential Smoothing09 ARIMA Models10 Neural Networks11 TBATS12 Conclusion

Copy as HTML

Open in ChatGPT

Open in Claude

Open in v0

As time-series data becomes ubiquitous, measuring change is vital to understanding the world. Here at Timescale, we use our PostgreSQL and TimescaleDB superpowers to generate insights into the data to see what and how things changed and when they changed—that’s the beauty of time-series data.

But, if you have data showing past and present trends, can you predict the future? This is where time-series forecasting models come into play, helping us make accurate predictions based on historical patterns.

In this guide, we explore forecasting models for time series, tools, and techniques for effective predictions.

Definition: Time-Series Forecasting

Time-series forecasting, a technique for predicting future values based on historical data, is essential for tasks like demand forecasting, financial analysis, and operational planning. By analyzing data that we stored in the past, we can make informed decisions that can guide our business strategy and help us understand future trends.

Time-series forecasting vs. machine-learning techniques

Some of you may be asking yourselves what the difference is between time-series forecasting and algorithmic predictions using, for example, machine learning. Well, machine-learning techniques such as random forest, gradient boosting regressor, and time delay neural networks can help extrapolate temporal data, but they are far from the only available options or the best ones (as you will see in this article).

The most important property of a time-series algorithm is its ability to extrapolate patterns outside of the domain of training data, which most machine-learning techniques cannot do by default. This is where specialized time-series forecasting techniques come in.

There are many approaches to forecasting time-series data, including advanced models like ARIMA, machine learning-based techniques, and modern deep learning methods. We'll explore these prediction methods for time series and provide practical examples.

Let’s check them out.

Time-Series Forecasting Examples

Many industries and scientific fields utilize time-series forecasting. Examples:

  • Business planning
  • Control engineering
  • Cryptocurrency trends
  • Financial markets
  • Modeling disease spreading
  • Pattern recognition
  • Resources allocation
  • Signal processing
  • Sports analytics
  • Statistics
  • Weather forecasting


The list is already quite long, but anyone with access to accurate historical data can utilize time-series analysis methods to forecast future developments and trends.

When Is Time-Series Forecasting Useful?

image

Even though time-series forecasting may seem like a universally applicable technique, developers need to be aware of some limitations. Because forecasting isn’t a strictly defined method but rather a combination of data analysis techniques, analysts and data scientists must consider the limitations of the prediction models and the data itself.

The most crucial step when considering time-series forecasting is understanding your data model and knowing which business questions need to be answered using this data. By diving into the problem domain, a developer can more easily distinguish random fluctuations from stable and constant trends in historical data. This is useful when tuning the prediction model to generate the best forecasts and even considering the method to use.

When using time-series analysis, you must consider some data limitations. Common problems include generalizing from a single data source, obtaining appropriate measurements, and accurately identifying the correct model to represent the data.

What to Consider When You Do Time-Series Forecasting

There are quite a few factors associated with time-series forecasting, but the most important ones include the following:

  • Amount of data. The amount of data is probably the most important factor (assuming that the data is accurate). A good rule of thumb would be the more data we have, the better our model will generate forecasts. More data also makes it much easier for our model to distinguish between trends and noise in the data.
  • Data quality. Data quality entails some basic requirements, such as having no duplicates, a standardized data format, and collecting data consistently or at regular intervals.
  • Seasonality. Seasonality means that there are distinct periods when the data contains consistent irregularities. For example, if an online web shop analyzed its sales history, it would be evident that the holiday season results in increased sales. In this example, we can deduce the correlation intuitively, but there are many other examples where analysis methods such as time-series forecasting are needed to detect such consumer behavior.
  • Trends. Trends are probably the most essential information you are looking for. They indicate whether a variable in the time series will increase or decrease in a given period. We can also calculate the probability of a trend to make even more informed decisions with our data.
  • Unexpected events. Unexpected events (sometimes called noise or irregularities) can always occur, and we need to consider that when creating a prediction model. They present noise in historical data, and they are also not predictable.
💡
Editor's Note: Optimizing your database ingest rate is critical when working with large amounts of data—learn how to do it in this blog post.

Time-Series Forecasting Techniques

Here’s an overview of the most popular time-series forecasting models, from statistical methods like ARIMA to advanced approaches using neural networks:

  • Time-series decomposition
  • Time-series regression models
  • Exponential smoothing
  • ARIMA models
  • Neural networks
  • TBATS

Time-Series Decomposition

Time-series decomposition is a method for explicitly modeling the data as a combination of seasonal, trend, cycle, and remainder components instead of modeling it with temporal dependencies and autocorrelations. It can either be performed as a standalone method for time-series forecasting or as the first step in better understanding your data.

When using a decomposition model, you need to forecast future values for each component above and then sum these predictions to find the most accurate overall forecast. The most relevant decomposition forecasting techniques using decomposition are Seasonal-Trend decomposition using LOESS, Bayesian structural time series (BSTS), and Facebook Prophet.

image
Decomposition of a used car sales data set (source)

Decomposition based on rates of change

Decomposition based on rates of change is a technique for analyzing seasonal adjustments. This technique constructs several component series, which combine (using additions and multiplications) to make the original time series. Each of the components has a specific characteristic or type of behavior. They usually include:

  • Tt: The trend component at time t describes the long-term progression of the time series. A trend is present when there is a consistent increase or decrease in the direction of the data. The trend component isn’t constrained to a linear function.
  • Ct: The cyclical component at time t reflects repeated but non-periodic fluctuations. The duration of these fluctuations depends on the nature of the time series.
  • St: The seasonal component at time t reflects seasonality (seasonal variation). You find seasonal patterns in time series that are influenced by seasonal factors. Seasonality usually occurs in a fixed and known period (for example, holiday seasons).
  • It: The irregular component (or "noise") at time t represents random and irregular influences. It is the remainder of the time series after removing other components.

Additive decomposition: Additive decomposition implies that time-series data is a function of the sum of its components. This can be represented with the following equation:

yt = Tt + Ct + St + It

where yt is the time-series data, Tt is the trend component, Ct is the cycle component, St is the seasonal component, and It is the remainder.

Multiplicative decomposition: Instead of using addition to combine the components, multiplicative decomposition defines temporal data as a function of the product of its components. In the form of an equation:

yt = Tt * Ct * St * It

The question is how to identify a time series as additive or multiplicative. The answer is in its variation. If the magnitude of the seasonal component is dynamic and changes over time, it’s safe to assume that the series is multiplicative. If the seasonal component is constant, the series is additive.

Some methods combine the trend and cycle components into one trend-cycle component. It can be referred to as the trend component even when it contains visible cycle properties. For example, when using seasonal-trend decomposition with LOESS, the time series is decomposed into seasonal, trend, and irregular (also called noise) components, where the cycle component is included in the trend component.

Time-Series Regression Models

Time-series regression is a statistical method for forecasting future values based on historical data. The forecast variable is also called the regressand, dependent, or explained variable. The predictor variables are sometimes called the regressors, independent, or explanatory variables. Regression algorithms attempt to calculate the line of best fit for a given dataset. For example, a linear regression algorithm could try to minimize the sum of the squares of the differences between the observed value and predicted value to find the best fit.

Let’s look at one of the simplest regression models, simple linear regression. The regression model describes a linear relationship between the forecast variable y and a simple predictor variable x:

yt = β0 + β1 * xt + εt

The coefficients β0 and β1 denote the line's intercept and slope. The slope β1 represents the average predicted change in y resulting from a one-unit increase in x:

image
Simple linear regression model example (source)

It’s important to note that the observations aren’t perfectly aligned on the straight line but are somewhat scattered around it. Each of the observations yt is made up of a systematic component of the model (β0 + β1 * xt ) and an “error” component (εt). The error component doesn’t have to be an actual error; the term encompasses any deviations from the straight-line model.

As you can see, a linear model is very limited in approximating underlying functions, which is why other regression models, like Least squares estimation and Nonlinear regression, may be more useful.

Exponential Smoothing

When it comes to time-series forecasting, data smoothing can tremendously improve the accuracy of our predictions by removing outliers from a time-series dataset. Smoothing leads to increased visibility of distinct and repeating patterns hidden between the noise.

Exponential smoothing is a rule-of-thumb technique for smoothing time-series data using the exponential window function. Whereas the simple moving average method weighs historical data equally to make predictions for time series, exponential smoothing uses exponential functions to calculate decreasing weights over time. Different types of exponential smoothing include simple exponential smoothing and triple exponential smoothing (also known as the Holt-Winters method).

image
Stationary time-series smoothing using different smoothing rates (EWMA) (source)

ARIMA Models

AutoRegressive Integrated Moving Average, or ARIMA, is a forecasting method that combines both an autoregressive model and a moving average model. Autoregression uses observations from previous time steps to predict future values using a regression equation. An autoregressive model utilizes a linear combination of past variable values to make forecasts:

An autoregressive model of order p can be written as:

yt = c + ϕ1yt-1 + ϕ2yt−2 + ⋯ + ϕpyt−p + εt

where εt is white noise. This form is like a multiple regression model but with delayed values of yt as predictors. We refer to this as an AR(p) model, an autoregressive model of order p.

On the other hand, a moving average model uses a linear combination of forecast errors for its predictions:

yt = c + εt + θ1εt−1 + θ2εt−2 + ⋯ + θqεt−q

where εt represents white noise. We refer to this as an MA(q) model, a moving average model of order q. The value of εt is not observed, so we can’t classify it as a regression in the usual sense.

If we combine differencing with autoregression and a moving average model, we obtain a non-seasonal ARIMA model. The complete model can be represented with the following equation:

y′t = c + ϕ1y′t−1 + ⋯ + ϕpy′t−p + θ1εt−1 + ⋯ + θqεt−q + εt

where y′t is the differenced series (find more on differencing here). The “predictors” on the right-hand side combine the lagged values yt and lagged errors. The model is called an ARIMA( p, d, q) model. The model's parameters are:

  • p: the order of the autoregressive component
  • d: the degree of first differencing involved
  • q: the order of the moving average part

The SARIMA model (Seasonal ARIMA) is an extension of the ARIMA model. This extension adds a linear combination of seasonal past values and forecast errors.

image
Predicting taxicab pickups in Times Square with TimescaleDB (source)

Neural Networks

Neural networks have rapidly become a go-to solution for time-series forecasting, offering powerful tools for classification and prediction in scenarios with complex data relationships. A neural network can sufficiently approximate any continuous functions for time-series forecasting.

Unlike classical models like ARMA or ARIMA, which rely on linear assumptions between inputs and outputs, neural networks adapt to nonlinear patterns, making them suitable for a wider range of data types. This means they can approximate any nonlinear function without prior knowledge about the properties of the data series.

image
Source

One common neural network architecture for forecasting is the Multilayer Perceptron (MLP), which uses layers of interconnected neurons to approximate complex functions and relationships within data. Beyond MLPs, Recurrent Neural Networks (RNNs) and Long Short-Term Memory networks (LSTMs) are particularly useful for sequential data like time series, as they maintain memory of previous steps, capturing trends over time.

Key benefits include:

  • Noise robustness: In real-world applications, data often includes irregularities—like missing sales data during holiday periods or unexpected spikes in social media traffic. Neural networks are designed to sift through this noise, learning to recognize core patterns and ignore random fluctuations. This makes them ideal for industries where data cleanliness is hard to maintain, such as e-commerce or finance, ensuring reliable predictions for time series even with incomplete data.
  • Nonlinear flexibility: Forecasting in complex environments like stock markets, where trends and interactions aren’t strictly linear, can be challenging. Traditional forecasting models for time series may struggle to capture the unpredictable shifts, but neural networks adapt to nonlinear changes with ease. For instance, in energy demand forecasting, factors like temperature and time of day create nonlinear effects on electricity usage. Neural networks can capture these dynamic, nonlinear interactions, making them adaptable to fluctuating conditions.
  • Multivariate support: Many forecasting tasks, like predicting demand for an airline, require analysis of multiple influencing factors, including seasonality, fuel prices, and weather. Neural networks support multiple inputs, which allows them to account for these variables simultaneously.
  • Multi-step forecasts: Retailers often need to predict demand for weeks or months ahead. Neural networks can forecast across multiple time steps, from weekly sales trends to quarterly revenue predictions.

In the figure below, a neural network with ten lagged inputs and a single hidden layer of six neurons is used for time-series forecasting.

image
Source

TBATS

Time-series data often contains intricate seasonal patterns that evolve across various time frames, such as daily, weekly, or yearly trends. Traditional models like ARIMA and exponential smoothing usually capture only a single seasonality, limiting their effectiveness for complex series. The TBATS model addresses this limitation by accounting for multiple, non-nested, and even non-integer seasonal patterns, ideal for long-term and complex forecasting tasks.

TBATS stands for Trigonometric seasonality, Box-Cox transformation, ARIMA errors, Trend, and Seasonal components, each of which adds a layer of precision to forecasts:

  • Trigonometric seasonality: TBATS effectively models complex cyclical patterns with different frequencies, enabling it to capture and represent overlapping seasonal trends such as daily, weekly, and yearly cycles that may interact in a time series.
  • Box-Cox transformation: This transformation stabilizes variance in data, enhancing the model’s robustness against fluctuations and outliers, which is crucial for achieving reliable predictions in datasets with varying scales or distributions.
  • ARIMA errors: By integrating ARIMA-like error structures, TBATS improves the handling of residual patterns, refining prediction accuracy. This combination allows the model to learn from past forecasting errors and adjust future predictions accordingly.
  • Trend: TBATS captures both linear and exponential trends, adapting to gradual changes over time for effective long-term forecasting. This capability is essential for industries where growth rates may change, such as technology or retail.
  • Seasonal components: The model accommodates diverse seasonal patterns without strict constraints, enabling detailed, accurate multi-seasonal forecasts. This flexibility allows TBATS to tackle complex seasonality that is often present in real-world data, leading to better insights and decision-making.
image
Source

In this figure, a TBATS model is applied to forecast call volume data, demonstrating its ability to capture complex seasonal trends.

However, as shown, TBATS often produces wide prediction intervals that may be overly conservative. This occurs because TBATS models handle diverse seasonality but can sometimes overestimate uncertainty in long-term forecasts, especially with noisy or highly fluctuating data.

Tools for Time-Series Forecasting

Choosing the right tools for time-series forecasting is key to achieving accurate predictions. Popular tools include Python libraries like statsmodels, Prophet, and TensorFlow, which support building robust time-series prediction models for various use cases. Here are some of the most popular and effective ones:

1. TimescaleDB

TimescaleDB is a relational database built on PostgreSQL, optimized for time-series data. It provides features like automatic data partitioning (hypertables), continuous aggregations, and advanced compression. With SQL as its query language, it empowers developers to analyze time-series data without learning a new query paradigm.

👀
Discover how a data scientist built a forecasting pipeline using TimescaleDB.

2. Druid

Apache Druid is a database designed for workflows that require fast aggregation and querying of time-stamped events. It supports flexible ingestion methods, making it suitable for log and event analytics. Druid excels in scenarios with high concurrency and low latency requirements.

3. Apache Kafka

While not a database, Kafka is a powerful tool for handling streaming time-series data. It’s commonly used as a pipeline for ingesting, processing, and distributing time-stamped events across systems. (See how you can build an IoT pipeline for real-time analytics using Kafka.)

4. Python ecosystem

Python provides a rich ecosystem for time-series analysis:

  • pandas: A versatile library for manipulating time-series data with features for resampling, aggregation, and visualization.
  • statsmodels: Excellent for statistical analysis, including ARIMA and exponential smoothing models.
  • prophet: Developed by Meta, Prophet simplifies forecasting with intuitive parameters and robust handling of seasonality. If you want to learn more about it, we've written an article on time-series forecasting with TimescaleDB and Prophet.
✨
Learn how to forecast time-series data in Python with our tutorial.

5. Visualization tools

Effective visualization is key to understanding time-series data:

  • Grafana: A popular tool for monitoring and interactive dashboards, often paired with databases like TimescaleDB or Druid. Learn how to quickly build a dashboard for your time series using Grafana.
  • Matplotlib/Plotly: Python libraries for creating detailed and interactive time-series plots.

6. AI/ML frameworks

For machine learning on time-series data, frameworks like TensorFlow and PyTorch offer pre-built models and flexibility for custom solutions. Additionally, libraries like tslearn focus specifically on time-series machine learning.

Choosing the right tool

The choice of tools depends on your use case. For developers needing SQL-based analytics, high performance, and scalability, TimescaleDB stands out. For high-frequency monitoring or custom machine learning pipelines, Druid or Python’s libraries may be more suitable. By understanding the strengths of these tools, you can build robust solutions tailored to your specific time-series challenges.

Conclusion

By leveraging time-series forecasting examples and prediction methods for time series, businesses can make data-driven decisions that improve efficiency and outcomes.

Time-series forecasting holds tremendous value for business development as it leverages historical data with a time component. While there are many forecasting methods to choose from, most are focused on specific situations and types of data, making it relatively easy to choose the right one.

If you are interested in time-series forecasting, look at this tutorial about analyzing Cryptocurrency market data. Using a time-series database like TimescaleDB, you can ditch complex analysis techniques that require a lot of custom code and instead use the SQL query language to generate insights.

Next steps

  • Learn how you can do time-series forecasting using Python.
  • See how this data scientist built a time-series forecasting pipeline using TimescaleDB.

Related posts

Speed Without Sacrifice: Building the Modern PostgreSQL for the Analytical and Agentic Era

Speed Without Sacrifice: Building the Modern PostgreSQL for the Analytical and Agentic Era

Announcements & ReleasesGeneral

Jun 17, 2025

Cofounders of Tiger Data (creators of TimescaleDB) Ajay Kulkarni and Mike Freedman discuss the company’s new name, showing how it reflects the company’s evolution.

Read more

What It Takes to Thrive at Tiger Data

What It Takes to Thrive at Tiger Data

GeneralTigerData

May 07, 2025

What does it take to thrive at Tiger Data? This article answers that question.

Read more

Stay updated with new posts and releases.

Receive the latest technical articles and release notes in your inbox.

Share

Get Started Free with Tiger CLI