StatsForecast: Nixtla's Python Library for Fast Statistical Forecasting
Lightning ⚡️ fast forecasting with statistical and econometric models.
At a glance
- What is it?
- StatsForecast bundles AutoARIMA, AutoETS, AutoCES, Theta and benchmark models behind an sklearn-style fit and predict API. It is built for large batches of univariate series, and it is not a neural or global model library.
- Who is it for?
- StatsForecast fits teams that need classical statistical forecasts over many univariate series and want an sklearn-style fit and predict loop. It is the wrong tool if you need a single global neural model across related series, or if you want a built-in anomaly detector rather than in-sample prediction intervals you post-process yourself.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 1, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The batch forecasting problem StatsForecast targets
The library is aimed at the case where you have thousands or millions of separate univariate series and you want a classical statistical model fitted to each one. The README frames the motivation bluntly: existing Python alternatives for statistical models are described as slow, inaccurate and not scaling well. StatsForecast answers with automatic model selection (AutoARIMA, AutoETS, AutoCES, AutoTheta, AutoMFLES, AutoTBATS) plus a battery of benchmark models such as naive and seasonal naive. The intended user is a data scientist or engineer who needs production forecasts or a baseline to beat, not someone exploring a single series in a notebook. The README's own scale claim is 1,000,000 series in 30 minutes with ray, and 10 benchmark models on 1,000,000 series in under 5 minutes. Those numbers come from linked experiments in the repository, not from an independent run.
Inside the fit and predict loop
The API follows sklearn: you construct a StatsForecast object with a list of models and a frequency string, call fit on a dataframe, then predict a horizon. The dataframe is expected in long format, with a unique_id column identifying each series, a ds column for the timestamp and a y column for the target; the related search phrase "Statsforecast unique_id" points at exactly this convention. Under the hood the package is not pure Python. The build backend is scikit-build-core with pybind11, and the sdist includes CMakeLists.txt, external_libs, include, src and python, which indicates a compiled core. That compiled layer is what makes the speed claims plausible, and it is also why wheels matter: on a platform without a prebuilt wheel, installation has to compile. Probabilistic output is first class. The minimal example passes level=[95] to predict, and the model tables mark probabilistic forecasts and probabilistic fitted values for the automatic models. Exogenous features are supported, but the support is uneven: the README's table marks exogenous features only for AutoARIMA and AutoMFLES among the automatic models. AutoETS and AutoCES take none.
Installing StatsForecast and running a first forecast
The README gives two install paths, pip and conda-forge. Both pull the compiled core as a dependency, so a plain pip install into a virtual environment is the shortest route.
pip install statsforecastThe conda route is documented as `conda install -c conda-forge statsforecast` for users who manage environments with conda. After installing, the README's minimal example fits AutoARIMA to the bundled AirPassengersDF dataset, which has a monthly frequency expressed as the string 'ME' and a season length of 12.
from statsforecast import StatsForecast
from statsforecast.models import AutoARIMA
from statsforecast.utils import AirPassengersDF
df = AirPassengersDF
sf = StatsForecast(
models=[AutoARIMA(season_length=12)],
freq='ME',
)
sf.fit(df)
sf.predict(h=12, level=[95])The call to predict returns twelve future periods per series, and because level=[95] is set, the result carries a 95 percent prediction interval alongside the point forecast. If you want a baseline before reaching for AutoARIMA, the README lists naive and seasonal naive models in the same models list, which is the cheapest way to check whether the automatic model earns its fitting time on your data.
Where StatsForecast is the wrong tool
StatsForecast is a univariate library. Each series gets its own model fit, and there is no cross-series information sharing in the way a global neural model would provide. If your series are short and related, and you expect learning across them to help, this is not the design. Anomaly detection is also not a separate estimator. The README points to a tutorial that detects anomalies using in-sample prediction intervals, which means you set the interval level and apply your own threshold; the library does not decide what an anomaly is. Two more practical constraints sit in the packaging metadata. The project requires Python 3.10 or newer, so 3.9 and below are out, and pandas is pinned to <3.0.0, which will block an upgrade to pandas 3 until that pin moves. Finally, the README's speed comparisons (20x faster than pmdarima, 500x faster than Prophet, 4x faster than statsmodels) are the project's own benchmark links. They are worth reading before you quote them, and worth re-running on your own series shape.
StatsForecast compared with statsmodels and Prophet
The difference from statsmodels is scope and interface. Statsmodels exposes individual estimators; you pick the order, fit it, and handle the loop over series yourself. StatsForecast wraps automatic selection (AutoARIMA, AutoETS, AutoCES) in one object that takes a list of models and a frequency, and it is built to run that loop over many series. The README positions it as 4x faster than statsmodels for ETS, with the experiment linked in the repository. Prophet takes a different route again: it is a single curve-fitting model with a fixed structure and a Stan backend, while StatsForecast offers per-series model selection across a family of classical models. The README claims a two-line replacement of FB-Prophet and links an arima_prophet_adapter experiment, and separately claims 500x faster than Prophet. If your current pipeline is Prophet-shaped, the adapter is the concrete migration path to inspect; if your pipeline is a hand-rolled statsmodels loop, the migration is mostly a matter of reshaping your data into unique_id, ds and y and letting the automatic models choose.
Maintenance, packaging and licence
The repository is not archived, and the last push was on 2026-09-10. Releases are not on a tight cadence: v2.1.1 landed on 2026-07-16, v2.1.0 two days earlier on 2026-07-14, and the release before that, v2.0.3, was on 2025-10-29. Upgrade cost is dominated by the compiled core rather than the Python surface. The sdist includes CMakeLists.txt, external_libs, include, src and python with sdist.inclusion-mode = "explicit", so building from source is a real compile step, and the wheel packaging sets wheel.install-dir = "statsforecast" with wheel.packages = ["python/statsforecast"]. The dependency list is short but pinned in places, notably pandas<3.0.0 and statsmodels>=0.14.5, and coreforecast>=0.0.17 sits between StatsForecast and its numeric core, so a coreforecast bump can change results. The licence is Apache-2.0 per both the README badge and the pyproject license field, which permits commercial use and modification; the repository also carries a THIRD_PARTY_LICENSES.md file, and anyone redistributing a built artifact should read it rather than assume the Apache-2.0 text covers every bundled component. This is a description of the licence metadata, not legal advice.
Editorial conclusion
StatsForecast fits teams that need classical statistical forecasts over many univariate series and want an sklearn-style fit and predict loop. It is the wrong tool if you need a single global neural model across related series, or if you want a built-in anomaly detector rather than in-sample prediction intervals you post-process yourself. Before adopting, check the Python version floor of 3.10, the pandas<3.0.0 pin, and whether AutoARIMA with exogenous regressors covers your features, since AutoETS and AutoCES do not take them. The repository is not archived and the last push was on 2026-09-10.
Frequently asked questions
How do I install statsforecast?
The README gives two commands: pip install statsforecast, or conda install -c conda-forge statsforecast. Both pull the compiled core that the package is built around.
How does statsforecast compare with statsmodels?
Statsmodels exposes individual estimators that you configure and loop over yourself. StatsForecast wraps automatic selection such as AutoARIMA, AutoETS and AutoCES behind an sklearn-style fit and predict API, and the README links an experiment claiming it is 4x faster than statsmodels for ETS.
How does statsforecast compare with Prophet?
Prophet is a single curve-fitting model with a Stan backend, while StatsForecast fits classical statistical models per series and selects among them. The README links an arima_prophet_adapter experiment for replacing FB-Prophet and claims StatsForecast is 500x faster than Prophet.
Is Prophet better than ARIMA?
StatsForecast does not answer this directly, but it treats the two as interchangeable options at the pipeline level: the README documents an adapter for replacing FB-Prophet with an ARIMA-based model, and ships AutoARIMA as one of its automatic models.
Is there a Python library for forecasting?
StatsForecast is one: a Python package of univariate statistical and econometric forecasting models, installed with pip install statsforecast, with automatic ARIMA, ETS, CES and Theta modeling and an sklearn-style fit and predict interface.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/nixtla-statsforecast)