Time series and forecasting · insight-0225
Encode moving holidays as windows before and after, not as a single day flag
- Evidence type
- documented fact
- Difficulty
- medium
- Roles
- Data scientist, Data analyst
- Industries
- aviation, retail, energy
Summary: situation, action, reason, boundary
Situation
A Turkish domestic route forecast misses the travel surge around Eid holidays, which move about eleven days earlier each Gregorian year.
Action
Create dummy windows for days before, during and after each holiday (lengths chosen by backtest), aligned to the holiday's actual date each year, and keep them as future-known regressors.
Reason
Moving holidays such as Easter and Eid shift relative to the calendar, so seasonal terms cannot capture them; dummy variables aligned to the date can.
Boundary
Travel, retail, energy, payments; any country with lunar or moving holidays.
Symptom or risk
Annual seasonality learns the holiday at last year's date, and a one-day dummy misses travel days before and after it.
Exceptions
One-off events with no history cannot be estimated from data; use judgment or analogues.
Trade-offs
Many window dummies with few occurrences overfit; pool similar holidays.
Pitfalls
Building holiday features from a calendar that was updated after the fact, which leaks announced bridge days.
Example
The synthetic airline calendar carries Turkish public holidays from the Python holidays package.
Lessons and concepts
Claims and their sources
Moving holidays such as Easter, Chinese New Year and Eid are best handled with dummy variables.