2
$\begingroup$

I was thinking, is it possible to implement a quarterly forecast for one year ahead such that its sum over year equals some constant number?

This problem may arise if we have, for example, some external forecast over next year, and we need to produce a quarterly forecast that is consistent with the yearly one.

Theoretically, I can write down an ML-maximization problem, and write then some stack of code. But is there maybe some existing solutions?

$\endgroup$
2
$\begingroup$

The simplest approach would of course be to calculate unconstrained quarterly forecasts $\hat{y}_1, ..., \hat{y}_4$ and then scale them so the sum is equal to your preset yearly total $\hat{y}$: $$ \tilde{y}_t := \frac{\hat{y}_t}{\sum_j\hat{y}_j}\times\hat{y}$$

Yes, this is ad-hoc, and of course you could do some kind of constrained likelihood maximization. However, I'd guess that imprecisions in both your yearly and your quarterly forecasts will trump any ad-hoccery in calculations.


Alternatively, I'd recommend that you look into forecasting your series on multiple time granularities, e.g., yearly, half-yearly, quarterly and monthly, and then combine the forecasts. This can pick up structure that is visible on different frequencies.

The MAPA algorithm by Kourentzes & Petropoulos does this. You can use the eponymous R package.

$\endgroup$
  • $\begingroup$ Can you use that approach for multiple seasonalities? $\endgroup$ – RandomDude Oct 30 '15 at 11:00
  • 1
    $\begingroup$ @RandomDude: the simple rescaling approach doesn't care where the original forecasts come from, so those could certainly come from models incorporating multiple seasonalities. (The "total" forecast needs to be a single number, though - although it could also be multiple numbers that in themselves are sum consistent.) MAPA can conceptually certainly model multiple seasonalities, and of course it already does cover monthly, quarterly, half-yearly and such seasonalities. It would also work if you had, say, seasonalities arising from the Western and the Muslim calendar. I don't know whether... $\endgroup$ – Stephan Kolassa Oct 30 '15 at 11:13
  • $\begingroup$ ... the MAPA package as such already covers multiple seasonalities. $\endgroup$ – Stephan Kolassa Oct 30 '15 at 11:14
  • $\begingroup$ seems like the mapa package itself is limited to time-series frequencies <= 24 based on the same restriction for the ets() model. guess there is no easy work around for that? $\endgroup$ – RandomDude Oct 30 '15 at 11:42
  • 1
    $\begingroup$ @RandomDude: not easy, no. But you can build your own MAPA algorithm. Essentially, you calculate forecasts on all time granularities, using whatever method you like. Then you apply Hyndman's optimal combination approach to combine all original forecasts, for which you just need the appropriate summation matrix. $\endgroup$ – Stephan Kolassa Oct 30 '15 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.