Models & backtesting
Six models compete on every run: three baselines and three more capable ones. A fixed rule chooses between them using held-out history.
Models
The engine uses the open-source StatsForecast library.
| Model | What it does |
|---|---|
Naive | Repeats the last observed value. The minimum bar any model has to clear. Baseline. |
SeasonalNaive | Repeats the value from the same point in the last cycle (the same weekday last week, for daily data). Runs only when a seasonal period is found. Baseline. |
HistoricAverage | Forecasts the mean of all history. The right baseline for noise around a constant. Baseline. |
AutoETS | Exponential smoothing. Automatically chooses how to model level, trend, and seasonality. A strong default for trending or seasonal series. |
AutoTheta | Robust and cheap, and good on short series. |
AutoARIMA | Automatically fits an ARIMA model. Can capture autocorrelation that smoothing models miss. |
On zero-heavy data (at least 30% zeros) only the baselines run, because the more capable models aren’t built for intermittent demand.
Rolling-origin backtesting
A model that fits the past well can still forecast badly. To measure forecasting skill, the engine hides the end of the history, forecasts it, and compares with what happened. It repeats this from several cut-off points, each time training on everything before the cut-off and forecasting the next stretch.
- 3 to 5 windows, each as long as the forecast horizon, with growing training sets. A 30-day forecast is scored on 30-day-ahead errors.
- Shortened horizon. If the history is too short for that, the test horizon is shortened and the result carries a warning.
- Refusal. Below a floor the run refuses and states the longest horizon the history can support.
Scoring over several windows is less luck-dependent than a single train/test split.
Metrics
Models are ranked by MASE, pooled over all backtest windows. MAE, RMSE and sMAPE are reported alongside it.
- MASE: a model’s average error divided by the training-data error of a seasonal-naive forecast. Below 1 beats that yardstick, though multi-step forecasts commonly score above 1. It is scale-free and safe when values hit zero.
- MAE: mean absolute error. The average miss, in the units of your data.
- RMSE: root mean squared error. Like MAE but punishes large misses more.
- sMAPE: symmetric percentage error, on a 0–200% scale. Scale-free, but unstable when values are near zero.
Deterministic model selection
The winner comes from a fixed rule applied to the backtest errors, not from Claude:
- Score every eligible model on the same windows.
- Find the best baseline: Naive, SeasonalNaive or HistoricAverage.
- A more capable model wins only if it beats that baseline by at least 5%. Otherwise the baseline wins.
- Ties go to the simpler model.
The same data and settings give the same winner, and the result records why it won.
Intervals
Forecasts carry 80% and 95% prediction intervals. If a model’s own 80% interval covered under 60% of the backtest actuals, the intervals are widened (never narrowed) and the result says so.
Why baselines matter
With only a handful of backtest windows, small error differences are mostly noise. The margin exists to avoid claiming structure in noise. In tests on noise and random walks, with no margin a more capable model “won” 72% of the time. With a 5% margin it won 9% of the time.
The margin does not improve accuracy, and we don’t claim it does. A benchmark on 260 series, scored on held-out data, found margins from 0% to 10% statistically indistinguishable on accuracy. What did matter was having the capable models at all: never using them gave about 40% more error. If a simple baseline performs best, the baseline wins, and the result says so.