Skip to content


Time series forecasting with scikit-learn regressors.

Skforecast is a python library that eases using scikit-learn regressors as multi-step forecasters. It also works with any regressor compatible with the scikit-learn API (pipelines, CatBoost, LightGBM, XGBoost, Ranger...).


The default installation of skforecast only installs hard dependencies.

pip install skforecast

Specific version:

pip install skforecast==0.6.0

Latest (unstable):

pip install git+

Install the full version (all dependencies):

pip install skforecast[full]

Install optional dependencies:

pip install skforecast[statsmodels]
pip install skforecast[plotting]


Hard dependencies

  • numpy>=1.20, <1.24
  • pandas>=1.2, <1.6
  • tqdm>=4.57.0, <4.65
  • scikit-learn>=1.0, <1.2
  • optuna>=2.10.0, <3.1
  • scikit-optimize==0.9.0
  • joblib>=1.1.0, <1.3.0

Optional dependencies

  • matplotlib>=3.3, <3.7
  • seaborn==0.11
  • statsmodels>=0.12, <0.14


  • Create recursive autoregressive forecasters from any regressor that follows the scikit-learn API
  • Create direct autoregressive forecasters from any regressor that follows the scikit-learn API
  • Create multi-time series autoregressive forecasters from any regressor that follows the scikit-learn API
  • Include exogenous variables as predictors
  • Include custom predictors (rolling mean, rolling variance ...)
  • Multiple backtesting methods for model validation
  • Grid search, random search and bayesian search to find optimal lags (predictors) and best hyperparameters
  • Include custom metrics for model validation and grid search
  • Prediction interval estimated by bootstrapping and quantile regression
  • Get predictor importance
  • Forecaster in production

Examples and tutorials


Skforecast: time series forecasting with Python and Scikit-learn

Forecasting electricity demand with Python

Forecasting web traffic with machine learning and Python

Forecasting time series with gradient boosting: Skforecast, XGBoost, LightGBM and CatBoost

Bitcoin price prediction with Python

Prediction intervals in forecasting models

Multi-series forecasting

Reducing the influence of Covid-19 on time series forecasting models


Skforecast: forecasting series temporales con Python y Scikit-learn

Forecasting de la demanda eléctrica

Forecasting de las visitas a una página web

Forecasting series temporales con gradient boosting: Skforecast, XGBoost, LightGBM y CatBoost

Predicción del precio de Bitcoin con Python

Workshop predicción de series temporales con machine learning Universidad de Deusto / Deustuko Unibertsitatea

Intervalos de predicción en modelos de forecasting

Multi-series forecasting


If you found skforecast useful, you can support us with a donation. Your contribution will help to continue developing and improving this project. Many thanks! 🤗 😍



joaquinAmatRodrigo/skforecast is licensed under the MIT License, a short and simple permissive license with conditions only requiring the preservation of copyright and license notices. Licensed works, modifications and larger works may be distributed under different terms and without source code.