liveBook · Manning

Forecasting

As explained in Time Series Forecasting Using Foundation Models

Time-series forecasting is the task of predicting future values of a variable or collection of variables indexed over time.

Time-series forecasting predicts future values of one or more variables indexed over time. It supports applications such as weather forecasting, demand planning, store-sales prediction, and website-traffic planning. section 1.0 section 10.3

Foundation forecasting models extend this task beyond data-specific models: one model can forecast series with different frequencies, seasonality, holiday effects, and temporal properties. They can also support anomaly detection and time-series classification. section 1.0

Common implementation routes include:

  • Use specialized models such as TimeGPT, Lag-Llama, Chronos, Moirai, or TimesFM for zero-shot or adapted forecasting. section 1.4 section 10.3
  • Frame forecasting as a language task by formatting an input series as a prompt and extracting predicted values from the model’s output. section 8.0
  • Reprogram an LLM for forecasting by aligning time-series patches with text prototypes, accepting that training is required. section 9.6

Prompt-based forecasting

A prompt-based workflow converts numerical observations into natural language input, asks an LLM for the next values, and parses its string output into predictions. Few-shot and chain-of-thought prompts may improve results, but preprocessing and extraction add complexity. section 8.0 section 8.10

Table 8.3 Pros and cons of each foundation forecasting model

Model

Pros

Cons

When to use

TimeGPT

Easy and fast to use

Comes with many native functions

Works on any device, regardless of hardware

Free plan

Paid product for a certain usage

Model may not be available if the server is down.

Forecasting on long and short horizons with exogenous features.

You need to fine-tune but do not have the local resources.

Lag-Llama

Open source model

Free to use

Awkward to use because we must clone the repository

Speed of inference depends on our hardware.

Quick proof of concept

Ideal for research-oriented projects

Chronos

Open source model

Free to use

Can be installed as a Python package

Speed and accuracy depend on our hardware.

Fine-tuning requires cloning the repository.

We must define some functions manually.

Forecasting on horizons shorter than 64 time steps

Forecasting series without strong trends

TimesFM

Open source model

Free to use

Can be installed as a Python package

Supports exogenous features

Only the largest model is available.

Restrictive requirements for use (16 GB of RAM, Linux-based system to install dependencies)

Knowledge of JAX is required for fine-tuning.

Cannot perform anomaly detection because it is a deterministic model

Ideal for deterministic forecasting in which prediction intervals are not required

You want to feed a long input series.

Moirai

Open source model

Free to use

Supports exogenous features

Can be installed as a Python package

Speed and accuracy depend on the hardware.

We must define helper functions when not working entirely with GluonTS.

You have exogenous features.

Forecasting on horizons shorter than 256 time steps

Large language models (Flan-T5 and Llama-3.2)

Possible to use free LLMs

Interacting through natural language feels intuitive,

Not built to handle time-series data

Requires lengthy code to preprocess the input and extract the values from the output

Requires a lot of computation power for local setups

You already have access to an LLM.

You need a natural language interface for forecasting.

You know how to develop prompts and safeguards for edge cases.

Compare forecasting models by ease of use, hardware requirements, openness, speed, horizon, fine-tuning needs, and intended use. section 8.9

How Time Series Forecasting Using Foundation Models covers it

How deep it goes
Explains zero-shot, prompt-based, and reprogrammed workflows, but stops short of a universally optimal model or complete benchmark.
Examples
Uses weekly store sales, daily blog visits, PromptCast, and models including TimeGPT, Chronos, Lag-Llama, Moirai, TimesFM, and Time-LLM.
What it assumes
Assumes familiarity with forecasting workflows but teaches model reuse, zero-shot prediction, prompting, and LLM adaptation through implementation.
What you can do after
Apply it via foundation models or LLM prompts, compare speed and performance, and select methods according to data, horizon, hardware, and resources.
How it connects
Connects forecasting with foundation models, transformers, large language models, zero-shot learning, fine-tuning, anomaly detection, and cross-validation.

Also explained in

Compare how 3 books explain forecasting →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Time Series Forecasting Using Foundation Models. The section links point to the parts of the book it draws on.