Fundamentals
Holidays, paydays, and other calendar traps
A calendar is the cheapest accurate feature in the building. Christmas, payday, school terms, a 4-day week, Ramadan, Chinese New Year — if the model has to rediscover those from residuals, you are wasting folds on a date table.
Updated Aug 26, 2026·7 min read
A holiday is not a season
Season is a shape that repeats. A holiday is a dated exception — sometimes with a hangover, sometimes with a week of prep. If the model has to rediscover Christmas from residuals every year, you are wasting folds on a date table. Calendar features are the cheapest accurate inputs in the building.
Payday, school terms, a four-day week, month-end close: same idea. They are known ahead. Put them in as flags (and sometimes a window), not as a surprise the residual has to eat.
Moving dates
Easter, Ramadan, Chinese New Year, Thanksgiving — they walk around the Gregorian calendar. A dummy that says “week 47” will miss them. You need the actual calendar for the geography you serve, including the days around the event when people travel or fast or shop.
- Fixed national holidays: a flag plus a small window often beats a clever spline.
- Moving holidays: use a real calendar file, not last year’s offsets.
- Events that are not holidays (finals, elections): timestamped or they are scenarios.
Whose calendar?
A US holiday file on a Gulf series, or a mainland calendar on a Hong Kong clinic, will teach the model a ghost. Multi-region workspaces need more than one calendar. Energy load on a religious holiday looks like a weekend. Hospital volume on a secular holiday looks like a Monday. Ask the people who staff the day.
Time features, on a schedule
Predict.ai’s feature engineering proposes calendar flags from the series it sees — and builds them in the same job that trains and serves. Inference at 6am still knows whose holiday it is. You can add a regional calendar as a signal if the default is wrong.
For one-off events (a World Cup, a storm, a strike), do not pretend they are holidays. Run a scenario on the live goal, or inject a known-ahead flag if you already approved the event. Driver discovery will not invent a concert that is not in the workspace.
FAQ
- Should holidays be a covariate or a dummy?
- A flag (and sometimes a window around the day) is enough if you will have the calendar at origin. Do not encode a holiday with a name the serving job cannot resolve in another country.
- What about events that are not holidays?
- Paydays, school terms, sports finals, elections. Same rule: timestamped, known ahead, or it is a scenario, not a feature.
Keep going
Guide
Feature engineering for time series
Most of the work is turning a clock and a few raw series into lags, rolling stats, and calendar flags the model can chew. Do that on a schedule, with no future leaking into the past, or the backtest is theater.
Guide
Energy load forecasting
Load, generation, and price live on a tight clock. Weather is a covariate you only get as a forecast. A skinny band at hour 36 is swagger. Operators plan reserves on a high quantile, not on a pretty MAE.
Guide
Workforce and staffing forecasts
Nurses, agents, cooks, field techs — the cost is people on a clock. A staffing forecast is arrivals or contacts by interval, with a band wide enough for a call-out list, not a single headcount that makes Tuesday look like Saturday.
Use case
Retail demand forecasting
Anticipate demand by product, store, channel, and region before buying or allocation decisions are locked.
Use case
Energy load forecasting
Forecast demand by interval, feeder, zone, and customer class with weather-driven uncertainty.