Seasonal Sales Forecasting Model: SHADES

We have quarterly observations of sales for the last two years. We would like to estimate a base, trend, and seasonal factors to form a sales forecasting function that minimizes the sum of squared prediction errors when applied to the historical sales. A detailed discussion of this model may be found in Using Variable Domain Functions.

MODEL:

SETS:

  PERIODS /1..8/: OBSERVED, PREDICT,

   ERROR;

  QUARTERS /1..4/: SEASFAC;

ENDSETS

 

DATA:

  OBSERVED = 10 14 12 19 14 21 19 26;

ENDDATA

 

MIN = @SUM( PERIODS: ERROR ^ 2);

 

@FOR( PERIODS: ERROR =

PREDICT - OBSERVED);

 

@FOR( PERIODS( P): PREDICT( P) =

SEASFAC( @WRAP( P, 4))

 * ( BASE + P * TREND));

 

@SUM( QUARTERS: SEASFAC) = 4;

 

@FOR( PERIODS: @FREE( ERROR));

 

END

Model: SHADES