# Python time series forecasting libraries

Python time series forecasting libraries fit models to past observations and predict future values with uncertainty intervals. A statistical forecaster fits models such as ARIMA or exponential smoothing to each input series. These libraries let planning teams and AI agents forecast demand, traffic, and revenue.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [statsmodels](#statsmodels) | 40.9M | 11.8K | Aug 2026 | BSD-3-Clause |
| [Prophet](#prophet) | 4.1M | 20.5K | Oct 2026 | MIT |
| [StatsForecast](#statsforecast) | 1.9M | 5.0K | Jul 2026 | Apache-2.0 |
| [pmdarima](#pmdarima) | 1.7M | 1.7K | Nov 2025 | MIT |
| [ARCH](#arch) | 1.1M | 1.7K | Nov 2026 | NCSA |
| [Chronos](#chronos-forecasting) | 969.3K | 6.3K | Sep 2026 | Apache-2.0 |
| [TensorFlow Probability](#tensorflow-probability) | 894.9K | 4.4K | Nov 2024 | Apache-2.0 |
| [sktime](#sktime) | 678.5K | 10.1K | Nov 2026 | BSD-3-Clause |

Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[statsmodels](#statsmodels) has the most monthly downloads in this comparison, at 40.9M, a count that covers all its statistical modeling.

## Capabilities

| Library | Pretrained zero-shot models | Multiple series per call |
| --- | --- | --- |
| [statsmodels](#statsmodels) | No | No |
| [Prophet](#prophet) | No | No |
| [StatsForecast](#statsforecast) | No | Yes |
| [pmdarima](#pmdarima) | No | No |
| [ARCH](#arch) | No | No |
| [Chronos](#chronos-forecasting) | Yes | Yes |
| [TensorFlow Probability](#tensorflow-probability) | No | Yes |
| [sktime](#sktime) | Via plugin | Yes |

## Libraries

### statsmodels

[GitHub](https://github.com/statsmodels/statsmodels) · [PyPI](https://pypi.org/project/statsmodels) · [Docs](https://www.statsmodels.org/stable/)

Runs statistical computations and models.

- Downloads / mo: 40.9M
- Stars: 11.8K
- Last release: 0.15.0
- License: BSD-3-Clause
- Capabilities: [From the statsmodels docs](https://www.statsmodels.org/stable/)

```sh
pip install statsmodels
```

**unit8co/darts** (9.6K stars)

[unit8co/darts](https://github.com/unit8co/darts) 

```python
def _fit(
    self,
    series: TimeSeries,
    future_covariates: TimeSeries | None = None,
    verbose: bool | None = None,
):
    super()._fit(series, future_covariates, verbose=verbose)

    self._assert_univariate(series)

    # storing to restore the statsmodels model results object
    self.training_historic_future_covariates = future_covariates

    m = staARIMA(
        series.values(copy=False),
        exog=future_covariates.values(copy=False) if future_covariates else None,
        order=self.order,
        seasonal_order=self.seasonal_order,
        trend=self.trend,
    )
    self.model = m.fit()

    return self

```

[darts/models/forecasting/arima.py](https://github.com/unit8co/darts/blob/eed2a150bba5d55ca5637560dc5c29fc47954db9/darts/models/forecasting/arima.py#L145-L167) · [More projects using statsmodels →](https://dashboard.exa.ai/playground/search?q=statsmodels%20GitHub%20projects)

**Quickstart**

```python
from statsmodels.tsa.arima.model import ARIMA

model = ARIMA([10, 12, 11, 13, 12, 14, 13, 15], order=(1, 0, 0))
fitted = model.fit()
forecast = fitted.forecast(steps=2)

```

From [statsmodels.tsa.arima.model.ARIMA.html](https://www.statsmodels.org/stable/generated/statsmodels.tsa.arima.model.ARIMA.html)

### Prophet

[GitHub](https://github.com/meta/prophet) · [PyPI](https://pypi.org/project/prophet) · [Docs](https://facebook.github.io/prophet/)

Fits time-series forecasts with nonlinear trends, seasonality, and holiday effects.

- Downloads / mo: 4.1M
- Stars: 20.5K
- Last release: 1.5.0
- License: MIT
- Capabilities: [From the Prophet docs](https://facebook.github.io/prophet/)

**Strengths**

- **Models recurring holiday effects.** Pass event dates through holidays to include them in the forecast.
- **Backtests at historical cutoffs.** Use cross_validation to compare earlier forecasts with observed outcomes.

**Watch out for**

- **Regressors need future values.** Supply predictor values for history and the complete forecast horizon.
- **Intervals assume recurring trend changes.** Validate interval coverage against held-out history before relying on it.

```sh
pip install prophet
```

**apache/superset** (75.5K stars)

[apache/superset](https://github.com/apache/superset) 

```python
def _prophet_fit_and_predict(  # pylint: disable=too-many-arguments
    df: DataFrame,
    confidence_interval: float,
    yearly_seasonality: Union[bool, str, int],
    weekly_seasonality: Union[bool, str, int],
    daily_seasonality: Union[bool, str, int],
    periods: int,
    freq: str,
) -> DataFrame:
    """
    Fit a prophet model and return a DataFrame with predicted results.
    """
    try:
        # `prophet` complains about `plotly` not being installed
        with suppress_logging("prophet.plot"):
            # pylint: disable=import-outside-toplevel
            from prophet import Prophet

        prophet_logger = logging.getLogger("prophet.plot")
        prophet_logger.setLevel(logging.CRITICAL)
        prophet_logger.setLevel(logging.NOTSET)
    except ModuleNotFoundError as ex:
        raise InvalidPostProcessingError(_("`prophet` package not installed")) from ex
    model = Prophet(
        interval_width=confidence_interval,
        yearly_seasonality=yearly_seasonality,
        weekly_seasonality=weekly_seasonality,
        daily_seasonality=daily_seasonality,
    )
    if df["ds"].dt.tz:
        df["ds"] = df["ds"].dt.tz_convert(None)
    try:
        model.fit(df)
        future = model.make_future_dataframe(periods=periods, freq=freq)
        forecast = model.predict(future)[["ds", "yhat", "yhat_lower", "yhat_upper"]]
    except Exception as ex:  # noqa: BLE001
        raise InvalidPostProcessingError(
            _(
                "Unable to generate forecast: %(error)s",
                error=str(ex),
            )
        ) from ex
    return forecast.join(df.set_index("ds"), on="ds").set_index(["ds"])

```

[superset/utils/pandas_postprocessing/prophet.py](https://github.com/apache/superset/blob/18430a95f7da90dd848bc4ed988db58dd8c3362d/superset/utils/pandas_postprocessing/prophet.py#L43-L85) · [More projects using Prophet →](https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20prophet%20to%20forecast%20future%20time%20series%20values%20with%20covariates%20intervals%20horizons%20and%20temporal%20backtesting&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import pandas as pd
from prophet import Prophet

df = pd.DataFrame({
    'ds': pd.date_range('2025-01-01', periods=30, freq='D'),
    'y': list(range(30)),
})
model = Prophet()
model.fit(df)
future = model.make_future_dataframe(periods=2)
forecast = model.predict(future)

```

From [quick_start.md](https://github.com/meta/prophet/blob/f57c4e13a29d18f927f2516f04990a3540711694/docs/_docs/quick_start.md)

### StatsForecast

[GitHub](https://github.com/Nixtla/statsforecast) · [PyPI](https://pypi.org/project/statsforecast) · [Docs](https://nixtlaverse.nixtla.io/statsforecast/)

Provides statistical forecasting models including ARIMA, ETS, CES, and Theta.

- Downloads / mo: 1.9M
- Stars: 5.0K
- Last release: 2.1.1
- License: Apache-2.0
- Capabilities: [From the StatsForecast docs](https://nixtlaverse.nixtla.io/statsforecast/)

**Strengths**

- **Fits models across many series.** Supply series identifiers, timestamps, and targets in a shared input frame.
- **Forecasts without retaining fitted models.** Use forecast for predictions that do not need reusable fitted state.

**Watch out for**

- **External predictors need future values.** Forecast those predictors separately or remove them from the model.

```sh
pip install statsforecast
```

**unit8co/darts** (9.6K stars)

[unit8co/darts](https://github.com/unit8co/darts) 

```python
def _fit(
    self,
    series: TimeSeries,
    future_covariates: TimeSeries | None = None,
    verbose: bool | None = None,
):
    super()._fit(series, future_covariates, verbose=verbose)
    self._assert_univariate(series)
    series = self.training_series

    if self._supports_native_future_covariates or future_covariates is None:
        target = series.values(copy=False).flatten()
    else:
        # perform OLS and get in-sample residuals
        self._linreg = LinearRegressionModel(
            lags_future_covariates=[0],
            use_static_covariates=False,
        )
        self._linreg.fit(
            series, future_covariates=future_covariates, verbose=verbose
        )
        target = self._get_target_residuals(series, future_covariates)

    self.model.fit(
        target,
        X=(
            future_covariates.values(copy=False)
            if future_covariates is not None
            and self._supports_native_future_covariates
            else None
        ),
    )
    return self

```

[darts/models/forecasting/sf_model.py](https://github.com/unit8co/darts/blob/1a040e78687468d926bbbae12f5befcd72d294e8/darts/models/forecasting/sf_model.py#L187-L219) · [More projects using StatsForecast →](https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20statsforecast%20to%20forecast%20future%20time%20series%20values%20with%20covariates%20intervals%20horizons%20and%20temporal%20backtesting&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```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])

```

From [README.md](https://github.com/Nixtla/statsforecast/blob/main/README.md)

### pmdarima

[GitHub](https://github.com/alkaline-ml/pmdarima) · [PyPI](https://pypi.org/project/pmdarima) · [Docs](https://alkaline-ml.com/pmdarima/)

Selects ARIMA models automatically, like the forecast package's auto.arima.

- Downloads / mo: 1.7M
- Stars: 1.7K
- Last release: 2.1.1
- License: MIT
- Capabilities: [From the pmdarima docs](https://alkaline-ml.com/pmdarima/)

```sh
pip install pmdarima
```

**sktime/sktime** (10.1K stars)

[sktime/sktime](https://github.com/sktime/sktime) 

```python
def _fit(self, y, X, fh):
    """Fit to training data.

    Parameters
    ----------
    y : pd.Series
        Target time series to which to fit the forecaster.
    fh : int, list, np.array or ForecastingHorizon, optional (default=None)
        The forecasters horizon with the steps ahead to predict.
    X : pd.DataFrame, optional (default=None)
        Exogenous variables are ignored

    Returns
    -------
    self : returns an instance of self.
    """
    self._cur_y = y
    self._cur_X = X
    if X is not None:
        X = X.loc[y.index]
    # statsmodels >= 0.15 raises on out-of-sample prediction if the index
    # is not supported, e.g., an integer index not starting at 0,
    # so we pass a RangeIndex in this case. Predictions are re-indexed in _predict.
    y_fit = y
    if pd.api.types.is_integer_dtype(y.index) and not isinstance(
        y.index, pd.RangeIndex
    ):
        y_fit = y.reset_index(drop=True)
        if X is not None:
            X = X.reset_index(drop=True)
    self._forecaster = self._instantiate_model()
    self._forecaster.fit(y_fit, X=X)
    self._y_name = y.name
    return self

```

[sktime/forecasting/base/adapters/_pmdarima.py](https://github.com/sktime/sktime/blob/7304dab8a5c5c071c990687a5e5993033e8adbc2/sktime/forecasting/base/adapters/_pmdarima.py#L48-L81) · [More projects using pmdarima →](https://dashboard.exa.ai/playground/search?q=pmdarima%20GitHub%20projects)

**Quickstart**

```python
import pmdarima as pm

y = pm.datasets.load_wineind()
model = pm.auto_arima(y, seasonal=True, m=12)
forecast = model.predict(n_periods=2)

```

From [README.md](https://github.com/alkaline-ml/pmdarima/blob/master/README.md)

### ARCH

[GitHub](https://github.com/bashtage/arch) · [PyPI](https://pypi.org/project/arch) · [Docs](https://bashtage.github.io/arch/univariate/introduction.html)

Implements ARCH models in Python.

- Downloads / mo: 1.1M
- Stars: 1.7K
- Last release: 9.0.0
- License: NCSA
- Capabilities: [From the ARCH docs](https://bashtage.github.io/arch/univariate/introduction.html)

```sh
pip install arch
```

**quarkfin/qf-lib** (978 stars)

[quarkfin/qf-lib](https://github.com/quarkfin/qf-lib) 

```python
def _calculate_single_value(self, returns: LogReturnsSeries) -> float:
    am = self._get_ARCH_model(returns, self.vol_process)
    res = am.fit(disp='off', show_warning=False)  # options={'maxiter': 10000, 'ftol': 1e-2})
    forecasts = res.forecast(horizon=self.horizon, method=self.method)
    column_str = 'h.{}'.format(self.horizon)  # take value for the selected horizon
    forecasts_series = forecasts.variance[column_str]
    # take the last value (most recent forecast)
    forecasted_value = forecasts_series.iloc[-1]
    # convert to volatility (if power=2, forecasted_value corresponds to variance, etc.)
    forecasted_vol = forecasted_value ** (1 / float(am.volatility.power))
    return forecasted_vol

```

[qf_lib/common/utils/volatility/volatility_forecast.py](https://github.com/quarkfin/qf-lib/blob/dfbcffc6aba129c827cfe7caab85da864e70fece/qf_lib/common/utils/volatility/volatility_forecast.py#L148-L158) · [More projects using ARCH →](https://dashboard.exa.ai/playground/search?q=arch%20GitHub%20projects)

**Quickstart**

```python
from arch import arch_model

returns = [0.4, -0.2, 0.7, -0.5, 0.1, 0.8, -0.3, 0.2, -0.6, 0.5]
model = arch_model(returns, vol='GARCH', p=1, q=1)
fitted = model.fit(disp='off')
forecast = fitted.forecast(horizon=1)

```

From [introduction.html](https://bashtage.github.io/arch/univariate/introduction.html)

### Chronos

[GitHub](https://github.com/amazon-science/chronos-forecasting) · [PyPI](https://pypi.org/project/chronos-forecasting) · [Docs](https://github.com/amazon-science/chronos-forecasting/blob/main/README.md)

Provides pretrained models for time series forecasting.

- Downloads / mo: 969.3K
- Stars: 6.3K
- Last release: 2.3.2
- License: Apache-2.0
- Capabilities: [From the Chronos docs](https://github.com/amazon-science/chronos-forecasting/blob/main/README.md)

```sh
pip install chronos-forecasting
```

**lee101/stock-prediction** (123 stars)

[lee101/stock-prediction](https://github.com/lee101/stock-prediction) 

```python
def predict_bp(
    self,
    context_df: pd.DataFrame,
    symbol: str,
    prediction_length: int,
    context_length: int,
) -> pd.DataFrame:
    """Make BP predictions using Chronos2Pipeline.predict_df."""
    self._load_model()

    # Prepare context dataframe in the format Chronos2 expects
    # Add symbol column for id
    df = context_df.copy()
    df["symbol"] = symbol

    # Trim to context_length
    if len(df) > context_length:
        df = df.iloc[-context_length:].copy()

    # Call predict_df
    predictions = self.model.predict_df(
        df,
        id_column="symbol",
        timestamp_column="timestamp",
        target="close_bps",  # Predict the close_bps column
        prediction_length=prediction_length,
        quantile_levels=[0.1, 0.5, 0.9],
    )

    return predictions

```

[hyperparam_chronos_bp.py](https://github.com/lee101/stock-prediction/blob/acbc1d20cbbd5c465a466bb9d3e6ad7e5dc2ad50/hyperparam_chronos_bp.py#L107-L136) · [More projects using Chronos →](https://dashboard.exa.ai/playground/search?q=chronos-forecasting%20GitHub%20projects)

**Quickstart**

```python
import pandas as pd
from chronos import Chronos2Pipeline

context = pd.DataFrame({
    'item_id': ['series'] * 64,
    'timestamp': pd.date_range('2025-01-01', periods=64, freq='D'),
    'target': list(range(64)),
})
pipeline = Chronos2Pipeline.from_pretrained('amazon/chronos-2', device_map='cpu')
forecast = pipeline.predict_df(context, prediction_length=2)

```

From [README.md](https://github.com/amazon-science/chronos-forecasting/blob/main/README.md)

### TensorFlow Probability

[GitHub](https://github.com/tensorflow/probability) · [PyPI](https://pypi.org/project/tensorflow-probability) · [Docs](https://www.tensorflow.org/probability/api_docs/python/tfp/sts/forecast)

Runs probabilistic modeling and statistical inference in TensorFlow.

- Downloads / mo: 894.9K
- Stars: 4.4K
- Last release: 0.25.0
- License: Apache-2.0
- Capabilities: [From the TensorFlow Probability docs](https://www.tensorflow.org/probability/api_docs/python/tfp/sts/forecast)

```sh
pip install tensorflow-probability
```

**WillianFuks/tfcausalimpact** (682 stars)

[WillianFuks/tfcausalimpact](https://github.com/WillianFuks/tfcausalimpact) 

```python
def build_posterior_dist(
    model: tfp.sts.StructuralTimeSeries,
    observed_time_series: pd.DataFrame,
    parameter_samples: Union[List[tfd.Distribution], Dict[str, tfd.Distribution]],
    num_steps_forecast: int
) -> tfd.Distribution:  # pragma: no cover
    """
    Builds the distribution for post-intervention data given samples from the
    posterior `P(z | y)`.

    Args
    ----
      model: tfp.StructuralTimeSeries
      observed_time_series: pd.DataFrame
          Corresponds to the `y` value.
      parameter_samples: Union[List[tfd.Distribution], Dict[str, tfd.Distribution]]
          samples from the posterior for each state component in `model`.
      num_steps_forecast: int
          How many time steps to forecast into the future. These will be compared against
          the real value of `y` to extract the estimation of impact.

    Returns
    -------
      posterior_dist: tfd.Distribution
    """
    return tfp.sts.forecast(
        model=model,
        observed_time_series=observed_time_series,
        parameter_samples=parameter_samples,
        num_steps_forecast=num_steps_forecast
    )

```

[causalimpact/model.py](https://github.com/WillianFuks/tfcausalimpact/blob/99bd5fb866acb352daf1b58c17d8f711d0e1a9ec/causalimpact/model.py#L421-L451) · [More projects using TensorFlow Probability →](https://dashboard.exa.ai/playground/search?q=tensorflow-probability%20GitHub%20projects)

**Quickstart**

```python
import tensorflow as tf
import tensorflow_probability as tfp

y = tf.constant([1., 2., 1.5, 2.5, 2., 3., 2.5, 3.5])
model = tfp.sts.LocalLevel(observed_time_series=y)
samples, _ = tfp.sts.fit_with_hmc(model, y)
forecast = tfp.sts.forecast(
    model, observed_time_series=y, parameter_samples=samples, num_steps_forecast=2
)

```

From [README.md](https://www.tensorflow.org/probability/api_docs/python/tfp/sts/forecast)

### sktime

[GitHub](https://github.com/sktime/sktime) · [PyPI](https://pypi.org/project/sktime) · [Docs](https://www.sktime.net/en/stable/examples/01_forecasting.html)

Provides a unified framework for machine learning with time series.

- Downloads / mo: 678.5K
- Stars: 10.1K
- Last release: 1.3.0
- License: BSD-3-Clause
- Capabilities: [From the sktime docs](https://www.sktime.net/en/stable/examples/01_forecasting.html)

```sh
pip install sktime
```

**Quickstart**

```python
from sktime.datasets import load_airline
from sktime.forecasting.naive import NaiveForecaster

y = load_airline()
forecaster = NaiveForecaster(strategy='last')
forecaster.fit(y)
forecast = forecaster.predict(fh=[1, 2, 3])
print(forecast)

```

From [README.md](https://www.sktime.net/en/stable/examples/01_forecasting.html) · [Find projects using sktime →](https://dashboard.exa.ai/playground/search?q=sktime%20GitHub%20projects)

## FAQ

### Which Python time series forecasting library should I use?

[Prophet](#prophet) suits forecasts with nonlinear trends, seasonality, and holiday effects. [StatsForecast](#statsforecast) suits ARIMA, ETS, and Theta models fitted across many series. [Chronos](#chronos-forecasting) suits pretrained forecasting models. [statsmodels](#statsmodels) suits classical statistical models.

### What is StatsForecast?

[StatsForecast](#statsforecast) provides statistical forecasting models including ARIMA, ETS, CES, and Theta. It fits each specified model to each input series.

### What is Prophet?

[Prophet](#prophet) fits time series forecasts with nonlinear trends, seasonality, and holiday effects. It expects a dataframe with ds timestamps and numerical y observations.

### What is sktime?

[sktime](#sktime) is a unified framework for machine learning with time series.

### What is pmdarima?

[pmdarima](#pmdarima) selects ARIMA models automatically, as the Python equivalent of the forecast package's auto.arima.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best Python time series forecasting libraries Prophet StatsForecast NeuralForecast Darts code examples horizons regressors backtesting",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
