Retrieved article excerpt
Open article · Retrieved 2026-10-27T12:27:26.749319+00:00
[FoundationForecast](https://raw.githubusercontent.com/TimeCopilot/foundationforecast/main/docs/assets/logos/foundationforecast-dark.png#gh-dark-mode-only)
[FoundationForecast](https://raw.githubusercontent.com/TimeCopilot/foundationforecast/main/docs/assets/logos/foundationforecast-light.png#gh-light-mode-only)
*The API for the time series foundation era · Forecast · Cross-validation · Anomaly detection*
[CI](https://github.com/TimeCopilot/foundationforecast/actions/workflows/ci.yaml)
[coverage](https://codecov.io/gh/TimeCopilot/foundationforecast)
[PyPI](https://pypi.python.org/pypi/foundationforecast)
[versions](https://github.com/TimeCopilot/foundationforecast)
[license](https://github.com/TimeCopilot/foundationforecast/blob/main/LICENSE)
[Join Discord](https://discord.gg/7GEdHR6Pfg)
---
## 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](https://github.com/TimeCopilot/impermanent) and other benchmarks such as [GIFT-Eval](https://huggingface.co/spaces/Salesforce/GIFT-Eval) and [FEV](https://arxiv.org/abs/2509.26468).
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](https://timecopilot.dev/) 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)
```
[Example ff.plot output: four ENTSO-E markets with Chronos and Toto forecasts](https://camo.githubusercontent.com/9ae11dc6339ca7c653e082a4f91d33a342f3b4fe0ff9d435a7775505030e91aa/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f656e74736f655f346d61726b6574735f717569636b5f6578616d706c652e706e67)
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
- 📈 **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, TimesFM-3, TimeGPT, T0, TimeH2O, TiRex-2, and Timestral; see [Exogenous variables](https://github.com/TimeCopilot/foundationforecast/blob/main/docs/exogenous-variables.md) and the [example notebook](https://github.com/TimeCopilot/foundationforecast/blob/main/docs/examples/exogenous-variables.ipynb).
- 💸 **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](https://github.com/TimeCopilot/foundationforecast/blob/main/experiments/gift-eval/README.md).
- 🎯 **Benchmark replication in CI.** Wrappers are regression-tested against official leaderboard submissions: [`experiments/gift-eval`](https://github.com/TimeCopilot/foundationforecast/tree/main/experiments/gift-eval) (GIFT-Eval MASE/CRPS on Modal GPU) and [`experiments/fev-bench`](https://github.com/TimeCopilot/foundationforecast/tree/main/experiments/fev-bench) (fev-bench `test_error` on known-dynamic tasks). [CI](https://github.com/TimeCopilot/foundationforecast/actions/workflows/ci.yaml) re-runs these checks on every change.
- 🚀 **GPU-native**. Automatically runs on GPU when available, without model-specific device configuration.
---
## 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](https://github.com/TimeCopilot/foundationforecast/blob/main/docs/exogenous-variables.md) (`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](https://huggingface.co/models) 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.
| Provider | Model | Forecast | CV | Anomalies | Intervals | Exogenous | Finetuning | License |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| [Amazon](https://camo.githubusercontent.com/66db898ea6365037b09b082449abcaf6b7b5c8902d9c32535536da4c64f3c3c6/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f616d617a6f6e2e706e67) | [Chronos](https://arxiv.org/abs/2403.07815) | ✓ | ✓ | ✓ | ✓ | ✓¶ | ✓ | Apache-2.0 |
| [IBM](https://camo.githubusercontent.com/8d8b1f59c82e591983d84c510243cb50538615ac8f5c84cab6b0ad609f6ed86b/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f69626d2e706e67) | [FlowState](https://arxiv.org/abs/2508.05287) | ✓ | ✓ | ✓ | ✓ | | | Apache-2.0 |
| [Salesforce](https://camo.githubusercontent.com/a2a67bd15539a1dc293e7b105583cc69d5a62b8d926d5c66d849d460a142caa1/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f73616c6573666f7263652e706e67) | [Moirai](https://arxiv.org/abs/2402.02592) | ✓ | ✓ | ✓ | ✓ | | | CC-BY-NC-4.0 |
| [IBM](https://camo.githubusercontent.com/8d8b1f59c82e591983d84c510243cb50538615ac8f5c84cab6b0ad609f6ed86b/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f69626d2e706e67) | [PatchTST-FM](https://arxiv.org/abs/2602.06909) | ✓ | ✓ | ✓ | ✓ | | | CC-BY-NC-SA-4.0 |
| [THUML](https://camo.githubusercontent.com/918e3b7d6fcd9269fde95d1eb26dae7adcdde662abbdaa443b5a3da3784a317f/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f7468756d6c2e706e67) | [Sundial](https://arxiv.org/abs/2502.00816) | ✓ | ✓ | ✓ | ✓ | | | Apache-2.0 |
| [The Forecasting Company](https://camo.githubusercontent.com/6e4e4709c4ae9130b8af510bc5149bbda938d54b76bbb259b31914cee51fe08e/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f7466632e706e67) | [T0](https://huggingface.co/theforecastingcompany/t0-alpha) | ✓ | ✓ | ✓ | ✓ | ✓ | | Apache-2.0† |
| [Huawei Paris Noah's Ark Lab](https://camo.githubusercontent.com/90dc7d9499b95f8d1d09ce150aceefbf40d2c57c533e4cdfce67b7ff9b943b89/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f6875617765692d6e6f61682e706e67) | [Tabby](https://arxiv.org/abs/2609.13956) | ✓ | ✓ | ✓ | ✓ | | | CC-BY-NC-4.0 |
| [Prior Labs](https://camo.githubusercontent.com/cf7fdfcb8ed22bf8b5587d9dc0f91b29cfb49f08b1de71ba863c612d47c4fe8e/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f7072696f726c6162732e706e67) | [TabPFN](https://arxiv.org/abs/2501.02945) | ✓ | ✓ | ✓ | ✓ | | | TabPFN NC‡ |
| [Tafsut](https://camo.githubusercontent.com/0f767f43c95d07374c484737ee8b91694515d83d2a8a579fa9b2ff1c342ec10b/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f7461667375742e706e67) | [Tafsut](https://github.com/Tafsut-FM/tafsut) | ✓ | ✓ | ✓ | ✓ | | | MIT |
| [NX-AI](https://camo.githubusercontent.com/e497e6a40e1ba7dc66d1e41a46d71731c9666f56aae2e0f931336948b8844d8c/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f6e782d61692e706e67) | [TiRex](https://arxiv.org/abs/2505.23719) | ✓ | ✓ | ✓ | ✓ | ✓¶ | | Community / Apache-2.0 |
| [H2O.ai](https://camo.githubusercontent.com/3952a619c3d8a96148355afb7b6c32956025bd600d10693ee814b2199061f74e/68747470733a2f2f63646e2d617661746172732e68756767696e67666163652e636f2f76312f70726f64756374696f6e2f75706c6f6164732f313637333537303739363134342d3633633061393166376635323534316466633763383331622e706e67) | [TimeH2O](https://huggingface.co/h2oai/timeh2o-v1) | ✓ | ✓ | ✓ | ✓ | ✓¶ | | H2O.ai NC# |
| [Nixtla](https://camo.githubusercontent.com/d95731a8dd97d91f255dad8e2f3c1d7ad09f104a95d8bdd0a6a84ab254ab6471/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f6e6978746c612e706e67) | [TimeGPT](https://arxiv.org/abs/2310.03589) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Nixtla API§ |
| [Google](https://camo.githubusercontent.com/71d505436e0410b22038b7ff8948bc590e9c29d4fdffbde3be8bd285c76db7a4/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f676f6f676c652e706e67) | [TimesFM](https://arxiv.org/abs/2310.10688) | ✓ | ✓ | ✓ | ✓ | ✓¶ | | Apache-2.0 |
| [Mistral](https://camo.githubusercontent.com/510a68b7aa006c3851bdb1b8405c21b0e9c229957dc03bb6f3cd725290502ccd/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f6d69737472616c2e706e67) | [Timestral](https://huggingface.co/collections/mistralai/timestral) | ✓ | ✓ | ✓ | ✓ | ✓¶ | | Modified MIT∥ |
| [Datadog](https://camo.githubusercontent.com/349a2ff2efe9a787679f2ee5404dc1c2a7732a73ff01f00950443b2d7b61b481/68747470733a2f2f74696d65636f70696c6f742e73332e616d617a6f6e6177732e636f6d2f7075626c69632f646174612f696d616765732f6c6f676f732f64617461646f672e706e67) | [Toto](https://arxiv.org/abs/2505.14766) | ✓ | ✓ | ✓ | ✓ | | | Apache-2.0 |
Licenses verified against Hugging Face model cards. Check the model card for your `repo_id` when in doubt.
¶ **Exogenous (native):** **Chronos** with `repo_id` containing `chronos-2` (e.g. `amazon/chronos-2`); **TimesFM** with **`google/timesfm-3.0-pytorch`**; **TimeGPT**; **T0** (`theforecastingcompany/t0-alpha`, `t0-beta`, `t0-gamma`); **TimeH2O** (`h2oai/timeh2o-v1`, not `-tiny`); **TiRex-2** (`NX-AI/TiRex-2` and other `TiRex-2-*` checkpoints, not TiRex 1.0); **Timestral** (`mistralai/Timestral-*`). Other hub models and other checkpoints in those families do not accept `X_df` under default `exog_strategy`. Set `