Any scikit-learn compatible model
Turn any regressor into a forecaster with lags, rolling and calendar features. Recursive or direct, one series or thousands.
Python library for time series forecasting using scikit-learn compatible models, statistical methods, and foundation models.
Daily electricity demand in Victoria, Australia, with temperature and public holidays as exogenous variables.
from skforecast.datasets import fetch_dataset data = fetch_dataset("vic_electricity") # aggregated to daily y, exog = data["demand"], data[["temperature", "holiday"]]
Daily electricity demand in Victoria, Australia (the half-hourly vic_electricity dataset, aggregated to daily totals). Models are fitted on data up to 5 November 2014 and evaluated on the last 56 days of the dataset. Temperature is treated as known in advance, as it would be with a weather forecast. The three models use the same exogenous variables, and the settings of LightGBM and ARIMA were chosen on an earlier validation period. The code is simplified for display; see the Quick start for complete examples.
Train, predict, tune and backtest the same way, whether the model is a gradient boosting regressor, a pre-trained foundation model or a classical statistical model.
Turn any regressor into a forecaster with lags, rolling and calendar features. Recursive or direct, one series or thousands.
Forecast with pre-trained models without training them, and evaluate them with the same backtesting as any other model.
ARIMA, SARIMAX, ETS and ARAR with automatic model selection, in the same interface as the rest.
RNN and LSTM architectures built with Keras for single and multiple series.
Not sure which one to use? Compare all forecasters in the Introduction to forecasting.
Train a single model on all your series at once. It learns patterns shared across products, stores or sensors, and it forecasts new or short series that a model per series cannot handle.
ForecasterRecursiveMultiSeries and ForecasterDirectMultiVariate.ForecasterFoundation.Moving from a linear model to gradient boosting or to a foundation model takes a couple of lines. Everything around it stays the same.
fit, predict and predict_interval, like scikit-learn.from sklearn.linear_model import Ridge
from skforecast.recursive import ForecasterRecursiveforecaster = ForecasterRecursive(
estimator=Ridge(),
lags=12
)forecaster.fit(y=y)
predictions = forecaster.predict(steps=12)
The tools you need to go from a promising notebook to a model you can defend in front of your team.
Validation that reproduces how the model will be used: refits, gaps, fold strides, fixed or expanding windows.
Learn more about backtesting →Prediction intervals with bootstrapping, conformal prediction and quantiles, evaluated with CRPS and coverage.
Learn more about probabilistic forecasting →Grid, random and Bayesian search with Optuna, including the number of lags.
Learn more about hyperparameter tuning →Rolling statistics, calendar features, exogenous and categorical variables, and differentiation.
Learn more about feature engineering →Feature importances and SHAP values to understand what drives each forecast.
Learn more about explainability →Select the features that matter and detect data drift once the model is deployed.
Learn more about monitoring →Use skforecast from your AI coding assistant, through an agent, or without writing code.
Machine-readable context files and agent skills, so ChatGPT, Claude, Copilot and others write correct, up-to-date skforecast code.
An AI forecasting assistant that pairs a deterministic engine, powered by skforecast, with an LLM reasoning layer.
Build and evaluate forecasting models visually, and export production-ready Python code.
Launch Studio →skforecast is free, BSD-3 licensed software, maintained by a small core team and supported by public funding and sponsors.

Sovereign Tech Fund. Service agreement to maintain skforecast as open digital infrastructure.

NumFOCUS affiliated project, alongside the scientific Python ecosystem.
GC.OS affiliated project, the German Center for Open Source AI.
If you use skforecast in a scientific publication, please cite the version you used.
Amat Rodrigo, J., & Escobar Ortiz, J. skforecast [Computer software]. https://doi.org/10.5281/zenodo.8382787
This DOI always resolves to the latest release. Each version has its own DOI and ready-made citations on Zenodo. The citation metadata is also in CITATION.cff, which GitHub offers as "Cite this repository".
@software{skforecast,
author = {Amat Rodrigo, Joaquin and Escobar Ortiz, Javier},
title = {skforecast},
license = {BSD-3-Clause},
url = {https://skforecast.org/},
doi = {10.5281/zenodo.8382787}
}skforecast is used in 70+ scientific publications. See them on Google Scholar →
Skforecast software: BSD-3-Clause License. Documentation: CC BY-NC-SA 4.0. The skforecast trademark is registered with the European Union Intellectual Property Office (EUIPO) under application number 019109684. Unauthorized use of this trademark, its logo, or any associated visual identity elements is prohibited without the express consent of the owner.