The API for the time series foundation era · Forecast · Cross-validation · Anomaly detection
Why?
Forecasting and time series have entered their foundation era. But, just like in the LLM space, different models bring different inductive biases and perform differently across domains, datasets, and even horizons.
The world already uses different LLMs for different use cases. We're seeing the same thing in forecasting: there is no single model that dominates everywhere. Results change with the data distribution and forecasting horizon, as we've seen in Impermanent and other benchmarks such as GIFT-Eval and FEV.
At the same time, every lab also ships its own API, dependencies, data conventions, and learning curve. That fragmentation makes foundation models hard to compare fairly, and even harder to use together in production, especially when you need exogenous variables (covariates): holidays, prices, weather, or other features known over the forecast horizon, each with its own input format.
FoundationForecast removes that friction: one FoundationForecast class, one data format, and the same methods: forecast, cross_validation, and detect_anomalies, across time series foundation models—including known-future covariates on supported checkpoints. ✨
Developed with 💙 by the TimeCopilot crew.
Quick example
import pandas as pd
from foundationforecast import FoundationForecast
from foundationforecast.models import Chronos, Toto
df = pd.read_csv(
"https://timecopilot.s3.amazonaws.com/public/data/entsoe_4markets_8w.csv",
parse_dates=["ds"],
)
ff = FoundationForecast(
models=[
Chronos(repo_id="amazon/chronos-bolt-tiny", alias="Chronos"),
Toto(context_length=512, alias="Toto"),
]
)
fcst_df = ff.forecast(df, h=24, level=[90])
cv_df = ff.cross_validation(df, h=24, level=[90])
anomalies_df = ff.detect_anomalies(df, level=99)
ff.plot(df=df, forecasts_df=fcst_df)
Your DataFrame needs three columns: unique_id, ds, and y. For best results, ensure ds is a proper datetime dtype (e.g., pass parse_dates=["ds"] when reading) or an ISO-8601 string so sorting is correct; cross-validation/anomaly detection will also convert ds to datetime internally where needed. If you omit freq, it is inferred from regular timestamps in ds (pass freq= when intervals are irregular).
Highlights
📐 Conformal prediction intervals. Use ConformalIntervals to calibrate any model's level / quantiles from point-forecast errors, with optional finite-sample correction or adaptive PID / ACI replay; see the guide and example notebook.
📈 Exogenous variables (covariates). Pass known-future features with X_df on forecast() (and exog columns in df for cross_validation()). Native support on Chronos-2, Simons, TimesFM-3, TimeGPT, T0, TimeH2O, TiRex-2, and Timestral; see Exogenous variables and the example notebook.
💸 Full GIFT-Eval replication for $37. 16 models, 97 dataset configurations each, in about 34 GPU-hours, every model with an official submission within 2% of its leaderboard MASE/CRPS. TimesFM 3 is the most accurate, for under $8. Read the writeup.
🎯 Benchmark replication in CI. Wrappers are regression-tested against official leaderboard submissions: experiments/gift-eval (GIFT-Eval MASE/CRPS on Modal GPU) and experiments/fev-bench (fev-bench test_error on known-dynamic tasks). CI re-runs these checks on every change.
🚀 GPU-native. Automatically runs on GPU when available, without model-specific device configuration.
🔮 Prophet adapter. Swap Prophet() for FoundationProphet(model=Chronos()) in existing Prophet pipelines: fit, make_future_dataframe, predict, plot and Prophet's diagnostics keep working, with any foundation model underneath. Install with foundationforecast[prophet]; see the guide and example notebook.

Supported models
Every model supports forecast, cross-validation, and anomaly detection through the same API. Intervals means prediction intervals via level or quantile forecasts. Exogenous marks native known-future exog (X_df on forecast(), exog columns in df for cross_validation()) for that wrapper when using a supported checkpoint; see ¶. Finetuning marks models that can adapt to your data at inference time. License is the weight/checkpoint license on the default Hugging Face repo (or provider terms for hosted APIs). See the note below for production use.
Pass any Hugging Face repo_id (or local checkpoint path) supported by the underlying model class.