Skip to main content

Nixtla   Tweet  Slack

All Contributors

Statistical ⚡️ Forecast

Lightning fast forecasting with statistical and econometric models

CI Python PyPi conda-nixtla License docs

StatsForecast offers a collection of widely used univariate time series forecasting models, including automatic ARIMA and ETS modeling optimized for high performance using numba. It also includes a large battery of benchmarking models.

💻 Installation

PyPI

You can install the released version of StatsForecast from the Python package index pip with:

pip install statsforecast

(Installing inside a python virtualenvironment or a conda environment is recommended.)

Conda

Also you can install the released version of StatsForecast from conda with:

conda install -c conda-forge statsforecast

(Installing inside a python virtualenvironment or a conda environment is recommended.)

Dev Mode If you want to make some modifications to the code and see the effects in real time (without reinstalling), follow the steps below:
git clone https://github.com/Nixtla/statsforecast.git
cd statsforecast
pip install -e .

🏃🏻‍♀️🏃 Getting Started

To get started just follow this guide. In the guide, we showcase AutoARIMA and AutoETS, and go further into probabilistic predictions, exogenous variables, and other baseline models.

🎉 New!

  • Open In Colab ETS Example: 4x faster than StatsModels with improved accuracy and robustness.
  • Open In Colab Complete pipeline and comparison: 20x faster than pmdarima and 500x faster than Prophet.

🔥 Highlights

  • Fastest and most accurate AutoARIMA in Python and R.

  • Fastest and most accurate ETS in Python and R.

  • Replace FB-Prophet in two lines of code and gain speed and accuracy. Check the experiments here.

  • Distributed computation in clusters with ray. (Forecast 1M series in 30min)

  • Good Ol' sklearn interface with AutoARIMA().fit(y).predict(h=7).

🎊 Features

  • Inclusion of exogenous variables and prediction intervals for ARIMA.

  • 20x faster than pmdarima.

  • 1.5x faster than R.

  • 500x faster than Prophet.

  • 100x faster than NeuralProphet.

  • 4x faster than statsmodels.

  • Compiled to high performance machine code through numba.

  • 1,000,000 series in 30 min with ray.

  • Out of the box implementation of ADIDA, HistoricAverage, CrostonClassic, CrostonSBA, CrostonOptimized, SeasonalWindowAverage, SeasonalNaive, IMAPA Naive, RandomWalkWithDrift, WindowAverage, SeasonalExponentialSmoothing, TSB, AutoARIMA and ETS.

Missing something? Please open an issue or write us in Slack

📖 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.

🔬 Accuracy & ⏲ Speed

ARIMA

The AutoARIMA model implemented in StatsForecast is 20x faster than pmdarima and 1.5x faster than R while improving accuracy. You can see the exact comparison and reproduce the results here.

ETS

StatsForecast's exponential smoothing is 4x faster than StatsModels' and 1.6x faster than R's, with improved accuracy and robustness. You can see the exact comparison and reproduce the results here

Benchmarks at Scale

With StatsForecast you can fit 9 benchmark models on 1,000,000 series in under 5 min. Reproduce the results here.

🧬 Getting Started

You can run this notebooks to get you started.

  • Example of different AutoARIMA models on M4 data Open In Colab

    • In this notebook we present Nixtla's AutoARIMA. The AutoARIMA model is widely used to forecast time series in production and as a benchmark. However, the alternative python implementation (pmdarima) is so slow that prevents data scientists from quickly iterating and deploying AutoARIMA in production for a large number of time series.
  • Shorter Example of fitting and AutoARIMA and an ETS model. Open In Colab

  • Benchmarking 9 models on millions of series.

📖 Documentation (WIP)

Here is a link to the documentation.

🔨 How to contribute

See CONTRIBUTING.md.

📃 References

  • The AutoARIMA model is based (translated) from the R implementation included in the forecast package developed by Rob Hyndman.
  • The ETS model is based (translated) from the R implementation included in the forecast package developed by Rob Hyndman.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


fede

💻 🚧

José Morales

💻 🚧

Sugato Ray

💻

Jeff Tackes

🐛

darinkist

🤔

Alec Helyar

💬

Dave Hirschfeld

💬

mergenthaler

💻

Kin

💻

Yasslight90

🤔

asinig

🤔

Philip Gillißen

💻

Sebastian Hagn

🐛

Han Wang

💻

Ben Jeffrey

🐛

Beliavsky

📖

Mariana Menchero García

💻

Nikhil Gupta

🐛

JD

🐛

josh attenberg

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Release files for statsforecast 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statsforecast 1.1.0
File Size Uploaded
statsforecast-1.1.0.tar.gz 76.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for statsforecast 1.1.0
File Interpreter ABI Platform
statsforecast-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 154.2 kB

Release files / statsforecast-1.1.0.tar.gz

Download URL statsforecast-1.1.0.tar.gz
Size 76.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b21d2d7e1e9a53d669a161c1457f2fff56d9684fceee7d9c4b79bd06744ee72e
BLAKE2b-256 checksum
How to use checksums
20d81fda829d4da999760b4e584e4367f5f0c4344b0d636d8581df64b44183a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release files / statsforecast-1.1.0-py3-none-any.whl

Download URL statsforecast-1.1.0-py3-none-any.whl
Size 77.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e74b61d77c42b022e99251baf96672e94a27aeebd8bb8c3d05d3e8326e79991
BLAKE2b-256 checksum
How to use checksums
4cc87977d0a2aa35149f8ea26c276880580c2173e571817ce29de4b9ab74ebd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release history Release notifications | RSS feed

2.1.1

26 release files

2.1.0

21 release files

2.0.3

26 release files

2.0.1

21 release files

2.0.0

21 release files

1.7.8

26 release files

1.7.7

26 release files

1.7.6

2 release files

1.7.5

2 release files

1.7.4

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page