Darts: User-Friendly Modern Machine Learning for Time Series
Citation. Julien Herzen, Francesco Lässig, Samuele Giuliano Piazzetta, Thomas Neuer and 15 other authors, as the paper's running head shortens it. "Darts: User-Friendly Modern Machine Learning for Time Series". Journal of Machine Learning Research 23(124), 1–6, 2022. jmlr.org/papers/v23/21-1177. Most authors are at Unit8 SA, the Swiss firm that maintains it. The software is unit8co/darts, version 0.48.1 of 16 October 2026, under Apache 2.0.
Status. Not applicable for now. The project has no forecasting strategy that needs it, and its leaks are ones the harness can't see. If a forecasting paper is ever re-run (#246, #251), Darts in an optional extra, without PyTorch, would serve. Its walk-forward retrains by default, but it trusts the user on two points: which covariates were known when, and what a pre-trained model saw.
Read. Read on 2026-11-28. I read the JMLR paper in full, from the PDF with pdftotext. I read version 0.48.1's pyproject.toml and three source files through the GitHub API. They are forecasting_model.py, which holds historical_forecasts, backtest and gridsearch, conformal_models.py, and the Scaler. I read the docstrings and parameter defaults, not every code path, and I didn't run the package.
Summary
Claim. A library of forecasting models, from ARIMA to deep neural networks, behind one fit()/predict() interface. The paper says that this one interface lets users "compare, backtest, and ensemble diverse models" without knowing how each works.
Method.
- Series. An immutable
TimeSeries, which wraps an xarray array of time, component and sample. - Covariates. Darts "differentiates future covariates, which are known into the future (such as weather forecasts) from past covariates, which are known only into the past". They "need not be aligned with the targets, as the alignment is done by the slicing logic based on the respective time axes".
- Walk-forward.
historical_forecastshas two modes. "Re-training Mode (Default,retrain=True)" retrains at each step, on an expanding window, or on a rolling one withtrain_length. "Pre-trained Mode (retrain=False)" forecasts from a model that was fitted beforehand.retraincan also be a number of steps or a function. - Transformers. With
data_transformers, "ifretrain=True, the data transformer re-fit on the training data at each historical forecast step". Withretrain=False, it "transforms the series once before all the forecasts". - Grid search. Three modes: walk-forward, a separate
val_series, or "Fitted value mode", which scores the fit on the training series. - Conformal models.
ConformalNaiveModelandConformalQRModelwrap a pre-trained global model. They take each interval from the model's own past errors on a recent calibration window, of lengthcal_length. - Dependencies. The core install needs about 20 packages. Among them are NumPy, pandas, scikit-learn, SciPy, statsmodels, shap, pyod, numba, xarray, holidays and matplotlib. PyTorch is an extra,
darts[torch]. CatBoost, LightGBM, Prophet, statsforecast and XGBoost are indarts[notorch].
Findings. The paper reports none. It describes the design and gives no benchmark.
Where the claims go beyond the evidence
Covariate classes are the user's word. Darts aligns covariates by their time stamps. It can't know when a value became public. Take a FRED series dated by its reference month, passed as a past covariate. It gives the model January's CPI on 1 January, but BLS publishes it in mid-February (#277, #295). The docs' example of a future covariate is "weather forecasts", and a forecast's own date of issue matters in the same way.
The pre-trained mode trusts the model. With retrain=False, Darts forecasts from whatever model it is given. In the docstrings I read, nothing checks that the model's training ended before the first forecast. A model fitted on the whole series and then "backtested" is in sample, and Darts accepts it. The conformal models make the same assumption. Their docstrings ask the user to make sure that the input "corresponds to a calibration set, and not the same as used during training".
Transformers fitted outside leak. The refit at each step applies only to transformers passed in data_transformers, with retrain=True. A Scaler fitted on the whole series beforehand carries the future's range into every window, and Darts can't see that.
No purge or embargo. The walk-forward has no gap between training and forecast. A target with no forward window, such as the next value, doesn't need a purge. But a label built from future returns does, as does an embargo against serial correlation (#10).
Fitted-value grid search is in sample. The docs say that it "can be a quick way to assess the model, but one cannot see if the model is overfitting the series".
Conformal coverage under drift. The intervals come from a recent calibration window, which adapts to slow change. Nothing in what I read promises coverage when the errors' distribution shifts, and split-conformal coverage rests on exchangeability (conformal-prediction.md).
Credit. The defaults are the safe ones: retraining at each step, and transformers refitted on each window. The docstrings name both traps above plainly. Every model shares one interface, so a forecast can be compared with a naive one in a few lines.
Use in this repo
A checklist for any Darts forecast. Before the harness sees a strategy that uses Darts, check five things:
- Each covariate is indexed by the time it became known. For FRED and the Yahoo bars, that is
store.known_lines' time, not the reference date (open_familyoffice/store.py). historical_forecastsruns withretrain=True, or with a model trained only beforestart.- Every fitted transformer goes in
data_transformers, never fitted on the whole series first. - Labels that look forward get a purge, and serially correlated targets an embargo, by
splits.py(#10), not by Darts. - Hyperparameters are chosen by the walk-forward or a separate validation series, never by fitted values. Each model and setting tried enters the trial ledger (#7).
Score the forecast against a naive one. A forecast must beat the last value before it feeds a strategy. open_familyoffice/scoring.py's compare runs a Diebold–Mariano test (#109). That is the step that ml-stock-price-forecasting.md's paper skipped. Darts' MASE scales errors by a naive forecast, but it is a point score, not a test.
The dependency. The core install adds about a dozen packages, numba among them. That suits an optional extra, like the literature map's, and not the core package. For classical models alone, statsmodels (statsmodels.md, #192) is lighter and is already planned. Darts is worth its weight only for global models across many series, or for re-running a forecasting paper with its own settings (#246, #251).