Does How You Feed AI the Calendar Change Its Forecasts?
Forecasting models can now take the hour, weekday and holidays as inputs. How you encode that calendar can swing holiday forecast error by up to 83%.
In one paragraph
Time series foundation models can now take calendar information such as the hour, weekday and public holidays. This preprint compared seven ways of encoding that calendar across four models and nine hourly datasets. Encoding choice changed accuracy for every model, with gaps of up to 9.9% on ordinary days and 83% on holidays within one model. Calendar inputs helped most on holidays, but no encoding was best everywhere, so benchmarks that fix one encoding may distort model rankings.
How were the calendar encodings compared?
Pretrained time series foundation models forecast a new series from its own history, which works for daily rhythms but not for holidays that recur irregularly. Many now accept covariates, and calendar information is the obvious one because it is known for every hour.
The authors ran Chronos-2, TabPFN-TS-3, TiRex-2 and TimesFM-3 zero-shot on nine hourly datasets from energy, transportation, traffic and water, with a context of 8192 hours and rolling 24-hour forecasts over a year of test data. They compared seven encodings of hour, weekday and holiday: ordinal, one-hot and cyclic encodings with a holiday flag, and four target encodings that replace each calendar slot with its average value in the context. Holidays and ordinary days were scored separately.
Did the encoding choice change forecast accuracy?
Yes, for every model. Within a single model, the MASE gap between the best and worst encoding reached 9.9% on ordinary days and 83% on holidays.
On holidays, calendar covariates improved forecasts in 26 of the 28 model-encoding combinations, and target encodings clearly beat conventional ones. Ordinary days were mixed: TabPFN-TS-3 improved with every encoding, while the other models gained little or slightly worsened.
There was no universal winner. Chronos-2, TabPFN-TS-3 and TiRex-2 did best with target encodings, TimesFM-3 with a cyclic encoding, and TiRex-2 struggled with encodings that used several inputs. A SHAP analysis showed covariates contributed 20–34% of the forecast on holidays but at most 14% on ordinary days.
Why does calendar encoding matter for benchmarks?
Current multivariate benchmarks evaluate all models under a single fixed encoding. Because encoding effects differ between models, such a benchmark may partly measure how well each model suits that encoding rather than its full potential.
The authors propose two remedies: treat encoding as an explicit factor in benchmarks, or have model developers build in categorical handling or publish a recommended encoding. They also suggest future data-driven approaches, such as in-context clustering, to derive encodings from the context itself.
A fair reading for practitioners is that anyone forecasting holiday-affected series should try a few encodings before judging a model, since the choice can matter as much as the model itself on holidays.
What are the limits of this calendar encoding study?
Read before you quote it
This is a preprint that has not been peer reviewed, and the authors note its limits:
- Context under a year. The main context of 8192 hours is roughly 49 weeks, so annual cycles are not fully covered.
- Hourly data only. Other resolutions were not tested.
- Calendar-driven targets. Series driven by weather or other continuous drivers are not expected to benefit similarly.
- Limited scope. Four models and nine datasets.
The study does not tell you which encoding is best for a given model on other data, and it does not establish why each model responds as it does; the authors attribute the differences to architecture and training.
- It does not show which encoding is best for models or data outside this study.
- It does not test covariates such as weather or prices.
- All main experiments used a context length of 8192, roughly 49 weeks, less than a full annual cycle.
- All datasets were evaluated at hourly resolution.
- The study covers targets driven by calendar effects; continuous drivers such as temperature were not tested.
- Only four models and nine datasets were evaluated.
Takeaways
- saysHow you encode the calendar changed forecast accuracy for every model, by up to eighty-three percent on holidays.
- saysCalendar inputs helped most on holidays, where target encodings beat the textbook ones.
- saysNo encoding won for every model, so benchmarks that fix one may distort the rankings.
- explainsA target encoding replaces a calendar slot, such as Tuesday at 8 a.m., with the average value seen at that slot in the model's context.
- interpretsA fair reading is that on holidays, how you write the calendar down can matter as much as which model you choose.
Ask the paper
In PaperSays you can ask this paper anything, by text or by saying “Hey Aiden”. Three questions listeners asked:
What are covariates in time series forecasting?
Extra inputs besides the series' own history, such as the hour, weekday or holiday. Hear the full answer in the app →
Which calendar encoding works best?
It depends on the model; target encodings helped most models on holidays, but none was best everywhere. Ask in the app →
Why do holidays matter for forecasts?
They recur irregularly, so models cannot infer them from recent history without calendar inputs. Ask in the app →
Briefing reviewed by an editor before publication. The paper belongs to its authors; this page summarises it and links to the original. Paper licence: CC BY 4.0. Corrections: support@papersays.com.