Nixtla /statsforecast
Lightning ⚡️ fast forecasting with statistical and econometric models.
★ 4,980⑂ 436👁 40⑃ 791● 431▤ 40
+1
Daily
4,980
stars
436
forks
40
watchers
791
prs
431
issues
40
releases
README
Nixtla
Statistical ⚡️ Forecast
Lightning fast forecasting with statistical and econometric models
StatsForecast offers a collection of widely used univariate time series forecasting models, including automatic ARIMA, ETS, CES, and Theta modeling optimized for high performance. It also includes a large battery of benchmarking models.
Installation
You can install StatsForecast with:
python
pip install statsforecast
or
python
conda install -c conda-forge statsforecast
Vist our Installation Guide for further instructions.
Quick Start
Minimal Example
python
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])
Get Started quick guide
Follow this end-to-end walkthrough for best practices.
Why?
Current Python alternatives for statistical models are slow, inaccurate and don't scale well. So we created a library that can be used to forecast in production environments or as benchmarks. StatsForecast includes an extensive battery of models that can efficiently fit millions of time series.
Features
Fastest and most accurate implementations of AutoARIMA, AutoETS, AutoCES, MSTL and Theta in Python.
Out-of-the-box compatibility with Spark, Dask, and Ray.
Probabilistic Forecasting and Confidence Intervals.
Support for exogenous Variables and static covariates.
Anomaly Detection.
Familiar sklearn syntax: .fit and .predict.
Highlights
Inclusion of exogenous variables and prediction intervals for ARIMA.
20x faster than pmdarima.
1.5x faster than R.
500x faster than Prophet.
4x faster than statsmodels.
1,000,000 series in 30 min with ray.
Replace FB-Prophet in two lines of code and gain speed and accuracy. Check the experiments here.
Fit 10 benchmark models on 1,000,000 series in under 5 min.
Missing something? Please open an issue or write us in
Examples and Guides
📚 End to End Walkthrough: Model training, evaluation and selection for multiple time series
🔎 Anomaly Detection: detect anomalies for time series using in-sample prediction intervals.
👩🔬 Cross Validation: robust model’s performance evaluation.
❄️ Multiple Seasonalities: how to forecast data with multiple seasonalities using an MSTL.
🔌 Predict Demand Peaks: electricity load forecasting for detecting daily peaks and reducing electric bills.
📈 Intermittent Demand: forecast series with very few non-zero observations.
🌡️ Exogenous Regressors: like weather or prices
Models
Automatic Forecasting
Automatic forecasting tools search for the best parameters and select the best possible model for a group of time series. These tools are useful for large collections of univariate time series.
|Model | Point Forecast | Probabilistic Forecast | Insample fitted values | Probabilistic fitted values |Exogenous features|
|:------|:----Top issues
#562Statsforecast tries to grab 360gb memory; crashes notebook15 comments · 2023-06-19#631[Dependencies] List fugue as optional dependency14 comments · 2023-09-07#709[AutoCES] Add external regressors support8 comments · 2023-11-24#1119Conformal intervals become extreme/null after inverse log transform (expm1) — what's the recommended approach?6 comments · 2026-03-23#435[Model forecast] Exception: No regressors provided6 comments · 2023-03-07#797[Question] AutoARIMA.forward5 comments · 2024-03-10#688VARMA model support5 comments · 2023-11-08#639[Models] Return and store models parameters during forecast and CV5 comments · 2023-09-16
Discussions
#1186v2.1.00 comments · 2026-07-14#1170Question Regarding End-to-End Walkthrough (Potential Error)1 comments · 2026-06-23#1162Timeline for the next release?2 comments · 2026-06-09#1124What optimal specs do i need to run nixtla stats forecast?0 comments · 2026-04-02#1063v2.0.30 comments · 2025-10-29#1022v2.0.20 comments · 2025-07-05#1014MSTL trains fast, but inference is slow1 comments · 2025-05-19#1013Retrain fitted model with new data0 comments · 2025-05-19
Latest release
v2.1.1 v2.1.1 2026-07-16Changes - arima: fixes @jmoralez (1173) - [CHORE] Publish Python 3.14 wheels @nasaul (1188)