Dealing with Weekly Forecasts
February 25, 2025
In the world of forecasting, the need to predict weekly data frequently arises, whether in the context of sales or demand volumes, material or capacity requirements. One quickly realizes that weekly data behaves differently from other granularities. Why is that the case? What distinguishes weekly data from most other granularities, and how can we deal with it?
The great thing about forecasting time series is that, as long as a few basic conditions are met, it hardly matters what type of time series you are dealing with. At their core, the data are just numbers, and their meaning is almost secondary. As long as all observations are ordered, recorded at consistent time intervals, contain minimal gaps, and share the same granularity, you can begin analyzing the time series.
Seasonality as a key component in weekly time series
A crucial characteristic of a time series is its seasonality. Not every time series exhibits seasonality, but if it does, it should be incorporated into the forecasting model. If its existence or length is unknown, there are ways to detect or estimate it automatically. In most cases, however, the seasonal length is obvious (e.g., a seasonal length of 12 for monthly data representing a year) and can be set accordingly in the forecasting model.
Let’s consider an example from short-term forecasting. Suppose we are modeling data on an hourly basis. A day consists of 24 hours, so we can model seasonality with a length of 24. Alternatively, if a weekly pattern exists, we can model a seasonal length of 168 (24 hours × 7 days). Increasing the granularity is generally not a problem either. For example, four 15-minute intervals fit perfectly into one hour. A daily seasonality can thus be represented using 96 time units (15-minute intervals), while a weekly seasonality can be modeled with a length of 672. Except for the two days in the year when daylight saving time shifts occur, these time intervals are always exactly the same length and perfectly nested within one another.
It gets slightly more complicated with monthly data. As we know, months have different lengths—some have 31 days, others 30, and February has just 28 or 29. Suppose we are dealing with a manufacturing company that operates production lines around the clock, regardless of weekdays, weekends, or holidays, and we are analyzing total production output. Since June has one day less than July, production in June will naturally be about 3.2% lower. In February, with only 28 days, production is roughly 9.7% lower—a significant difference.
Fortunately, time series analysis can handle such variations effectively. A seasonal component of length 12 in the forecasting model allows us to account for monthly differences and incorporate them into the forecast. Problem solved. The same applies to quarterly data, which falls into the same relatively well manageable category.
Peculiarities of weekly data
All the seasonal lengths mentioned so far have the convenient property of being whole numbers. This means that a cycle, for example, repeats exactly every 24 hours. However, with weekly data, we run into a problem. It starts with the fact that four weeks do not make up a month (except, in most cases, February). Likewise, weeks do not fit neatly into a year: 365 days correspond to 52 weeks and one extra day. This is why the calendar year is typically divided into 52 weeks, occasionally extending to 53. Strictly speaking, this results in a non-integer annual seasonality of 52.14 weeks (or 52.29 weeks in leap years).
How do we deal with this?
Various solutions exist in both literature and practice. Depending on the nature of the data and the preferred forecasting methods, different approaches may be suitable. Below, we introduce some possible solutions, which can also be applied to daily data, as it exhibits similar characteristics to weekly data.
Case 1: Forecasting methods that handle non-integer seasonal lengths
At this point, the number of applicable methods is relatively small. One approach for handling non-integer seasonal lengths is TBATS, as described by De Livera et al. (2011). This method is based on Fourier transformation and uses trigonometric functions to model complex seasonal components.
The idea behind Fourier transformation can also be utilized in other forecasting methods. The Australian statistician Rob J. Hyndman (2014) describes an approach in his blog that, in addition to TBATS, involves transforming seasonal patterns using Fourier transformation and then incorporating them as regressors in a non-seasonal ARIMA model.
We can extend this idea further by integrating the transformed data into any forecasting model that supports regressors. This means that, in addition to ARIMA, regression-based and machine learning methods can also be used, as well as exponential smoothing with covariates.
Case 2: Forecasting methods that can handle seasonality flexibly
Regression and machine learning methods can be fully adapted to model seasonality. Although not originally designed for time series, these methods can be applied to time series forecasting with careful and somewhat complex handling.
One way to model seasonality is through dummy variables that represent specific points in the seasonal cycle. This approach allows for the separate modeling of calendar week (CW) 53. However, a key requirement for this method to work is that the dataset contains at least two occurrences of CW 53—though this length of time series data is quite limited in practice.
Case 3: Forecasting methods that require integer seasonal lengths
Forecasting methods that strictly require integer seasonal lengths include classic time series approaches such as ARIMA and exponential smoothing. If we do not want to abandon these methods for forecasting, the following solution can be applied:
To achieve an integer seasonal length, we round the average number of weeks per year—calculated as (365/7 * 3 + 366/7)/4 = 52.18—to 52. We then apply a seasonal length of 52 to the weekly data either as is or by modifying the time series history and removing CW 53 from the dataset.
The consequence of this approach is that we align CW 1 with CW 1, CW 2 with CW 2, …, and CW 52 with CW 52. While not a perfect solution, the weeks still largely overlap. Only every few years does this lead to a slightly larger error.
Weekly forecasting: The use case determines the approach
In summary, when it comes to weekly forecasts, each of the proposed methods has its advantages and disadvantages. While we have touched on some of these here, others are more complex and ultimately depend on the specific use case.
By the way: If annual seasonality is unlikely to be present and the exact position within the year is not critical for the forecast—meaning that the primary focus is on recent trends—then you can skip the complexity and simply treat the weekly time series as a straightforward sequence of weekly data, regardless of the calendar week number.
While our timekeeping system occasionally complicates modeling, it also has its perks: If weeks weren’t structured the way they are, your birthday wouldn’t occasionally fall on a weekend. And that would be a real shame. 😊
Weekly forecasts can be easily generated using our forecasting software future. Get started for free today!
References:
De Livera, Alysha M., Rob J. Hyndman, and Ralph D. Snyder. “Forecasting time series with complex seasonal patterns using
exponential smoothing.” Journal of the American Statistical Association 106.496 (2011): 1513–1527.
Rob J. Hyndman “Forecasting weekly data”,
unter:
https://robjhyndman.com/hyndsight/forecasting-weekly-data/
(accessed on 27.06.2019).