FORECAST STRATEGIES AND CALCULATIONS IN SAP APO

Model Constant Model APO Forecast Strategy code 10 (or) 11 Forecast Strategy & Calculation Spread Sheet First Order Exponential Smoothing (FOES) Explanation on the Model Exponential smoothing methods are the most widely accepted time series techniques in use today. They were originally called "exponentially weighted moving averages." The basic premise of single exponential smoothing is that the sales values for more recent periods have more impact on the forecast and should therefore be given more weight, while the weights for older periods will decrease at an exponential rate. In addition, because the calculations require more recent sales history, data storage is minimized (or at least reduced) as a result of the minimal historical data required. First-order exponential smoothing, also known as single exponential smoothing, uses a smoothing constant (alpha) to which a value between 0 and 1 is assigned. The larger its value (closer to 1), the more weight it assigns to recent sales history. A large alpha (.8) is comparable to using a small number of time periods (n) in a moving average model. A small n allows greater emphasis to be placed on recent periods. Conversely, a small alpha (.1) is similar to using a large number of time periods in the moving average, because the impact of recent data is lessened. The strengths of exponential smoothing models are that they: - Are reasonably simple to understand and use - Provide more weight to recent data periods - Do not require much data storage - Have fairly good accuracy for short-term forecasts (one to three periods out into the future) The weaknesses of exponential smoothing models are that: - A great deal of research may be required to find the correct alpha value - They are usually weak models to use for medium or long-range forecasting

FOES.xlsx

(three periods and beyond) - Forecasts can be thrown into great error because of large random fluctuations in recent data. Because they rely heavily on past history and on a smoothing factor to predict the future, exponential smoothing models cannot easily predict turning points in recent data. At least one to three periods are usually needed to correct for extreme fluctuations in recent data. The principles of first-order exponential smoothing are:

The older the time series values, the less important they are for the calculation of the forecast. The present forecast error is taken into account in subsequent forecasts.

The constant model with first-order exponential smoothing (forecast strategies 11 and 12) can be derived from the above two considerations. A simple transformation gives the basic formula for exponential smoothing (see below). Determining the Basic Value

To calculate the forecast value, the system uses the preceding forecast value, the last historical value, and the alpha smoothing factor. This smoothing factor weights the more recent historical values more than the less recent ones, so that they have a greater influence on the forecast. How quickly the forecast reacts to a change in pattern depends on the smoothing factor. If you choose 0 for alpha, the new average is equal to the old one and the basic value calculated previously remains; that is, the forecast does not react to current data. If you choose 1 for the alpha value, the new average equals the last value in the time series. The most common values for alpha lie, therefore, between 0.1 and 0.5. For example, an alpha value of 0.5 weights historical values as follows: 1st historical value: 50% 2nd historical value: 25% 3rd historical value: 12.5% 4th historical value: 6.25% The weightings of historical data can be changed by a single parameter. Therefore, it is relatively easy to respond to changes in the time series.

Use
Use the constant model with first-order exponential smoothing for time series that do not have trend-like patterns or seasonal variations.

Constant Model 12 First Order Exponential Smoothing (FOES) with Automatic Alpha adaptation Uses First Order Exponential Smoothing and adapts the alpha factor.3.05.90.xlsx Features The minimum alpha factor is 0. Activities The system uses the following iterative formula to calculate the alpha factor in each ex-post period: TS is the tracking signal. TS = ABS [ET (i) / MAD (i)] if MAD (i)  0. FOES with auto Alpha. or a value that you have entered in the Univariate forecast profile.  i is used to calculate the ex-post forecast in the period i+1. Use In this forecast strategy. The maximum alpha factor is 0. The initial alpha factor ( 0) is either the default of 0.     TS = 0 if MAD(i) = 0. the alpha factor is adapted in every ex-post period based on the mean absolute deviation (MAD) and the error total (ET). where n is the number of periods in the ex-post forecast. . i = 1 … n.

it takes precisely 'n' periods for the forecast to adapt to a possible level change. You define the historical time horizon in the master forecast profile.xlsx Definition The moving average model is used to exclude irregularities in the time series pattern. Formula for the Moving Average Use This forecast strategy is only suitable for time series that are constant. that is. the forecast is the same in every period Moving Average. that is. This average for n periods of history is the forecast result for every period in the forecast horizon. This strategy calculates the average of the time series values in the historical time horizon.Constant Model 13 Moving Average Features The system calculates the average of the values in the historical time horizon as defined in the master forecast profile. As all historical data is equally weighted with the factor 1/n. No ex-post forecast is calculated with this forecast strategy. . for time series with no trend-like or season-like patterns.

you must also adapt the weighting factors. For example. you can define the factors such that recent data is weighted more heavily than older data. The sum of the weighting factors does not have to be 100%. No ex-post forecast is calculated with this forecast strategy. You define the weighting factor in a weighting group. When creating a weighting group. every historical value is weighted with a factor from the weighting group in the Univariate forecast profile. Weighted Moving Average. the system is able to react more quickly to a change in level. Therefore. You do this if the more recent data is more representative of what future demand will be than older data. you enter the weighting factors as percentages. . Use The accuracy of this model depends largely on your choice of weighting factors.Constant Model 14 Weighted Moving Average The system weights every time series value with a weighting factor. Formula for the Weighted Moving Average The weighted moving average model allows you to weight recent historical data more heavily than older data when determining the average.xlsx Definition In the weighted moving average model (forecast strategy 14). If the time series pattern changes.

Formula for First-Order Exponential Smoothing in a Trend. 31. 30. the trend value and the seasonal index are calculated after the initial period.Trend 20 (or) 21 With First Order Exponential Smoothing Definition: The following formula is used in forecast strategies 20. seasonal or seasonal trend model is determined. 21. 40 and 41. See also Model Initialization as well as the definition of exponential smoothing in the APO Glossary. The basic value. The calculation takes into account both trend and seasonal variations. and in forecast strategies 50 to 56 where a trend. Seasonal or Seasonal Trend Model .

seasonal or seasonal trend model with first-order exponential smoothing for time series that have trend-like patterns and/or seasonal variations.Use Use the trend. .

Second-order exponential smoothing. also known as Holt's linear exponential smoothing.Trend 22 With Second Order Exponential Smoothing SOES. the forecasts will trail behind (lag) that trend.xlsx The method of first-order exponential smoothing is theoretically appropriate when the data series contains a horizontal pattern (that is. Definition Second-order exponential smoothing is used in forecast strategies 22 and 23. In the second equation. it does not have a trend). the values calculated in the first equation are used as initial values and are smoothed again. It is based on a linear trend and consists of two equations. The first equation corresponds to that of first-order exponential smoothing except for the bracketed indices. Formulas for Second-Order Exponential Smoothing . avoids this problem by explicitly recognizing and taking into consideration the presence of a trend. If first-order exponential smoothing is used with a data series that contains a consistent trend. It prepares a smoothed estimate of the trend in a data series.

TS = ABS [ET (i) / MAD (i) ] if MAD (i) ¹ 0. You can achieve a more efficient adjustment of the forecast to the actual values pattern by using second-order exponential smoothing. or a value that you have entered in the Univariate forecast profile. TS = 0 if MAD(i) = 0. where n is the number of periods in the ex-post forecast.05. Alpha(i) is used to calculate the ex-post forecast in the period i+1.xlsx In forecast strategies 12 and 23. Trend 23 With Second Order Exponential Smoothing Use SOES with Auto Alpha. The initial alpha factor (a 0) is either the default of 0.Use If. The maximum alpha factor is 0. Uses Second Order Exponential Smoothing and adapts the alpha factor. Features The minimum alpha factor is 0. a time series shows a change in the average value such that a trend pattern is revealed. The system uses the following iterative formula to calculate the alpha factor in each ex-post period: TS is the tracking signal. i = 1 … n.90.3. first-order exponential smoothing produces forecast values that lag behind the actual values by one or several periods. over several periods. . the alpha factor is adapted in every ex-post period based on the mean absolute deviation (MAD) and the error total (ET).

The calculation takes into account both trend and seasonal variations. 31. See also Model Initialization as well as the definition of exponential smoothing in the APO Glossary. seasonal or seasonal trend model is determined. The basic value. Formula for First-Order Exponential Smoothing in a Trend.Seasonal 30 (or) 31 Seasonal model based on Winters' method Definition: The following formula is used in forecast strategies 20. 40 and 41. the trend value and the seasonal index are calculated after the initial period. 21. Seasonal or Seasonal Trend Model . and in forecast strategies 50 to 56 where a trend. 30.

seasonal or seasonal trend model with first-order exponential smoothing for time series that have trend-like patterns and/or seasonal variations.Use Use the trend. .

. forecast strategy 35. b) The average value A k of each season k is calculated: A k = Σ V(t) / n season Where V(t) is the historical value of period t and n season is the number of periods per season. and reapplies the seasonal influence to the calculated linear regression line. Do not use strategy 35 if your historical data has strong trend patterns. Activities The system calculates the seasonal linear regression line as follows: 1. removes the seasonal influence from the data.Seasonal 35 Seasonal Linear Regression Calculates seasonal indices. See also Seasonal Linear Regression Use Seasonal linear regression. The seasonal indices are calculated: Determination of the starting seasonal index for each historical period t a) The number n k of seasons available within the whole historical time series is calculated: n k = n total / n season Where n season is the number of periods per season and n total is the total number of historical values. can be used as an alternative to forecast strategies 30 and 31. performs linear regression. which return large basic values if the seasonal index is zero or nearly zero.

c) The starting seasonal index s start (t) is calculated for each period t within each season. . 4. The actual data is corrected on the basis of the seasonal indices calculated in step 1.+s start ((k-1) n season +s))/k. If the smoothing factor is 0.. the starting seasonal indices are averaged: s average (s) = (s start (s) + s start (n season + s) + . the result of step (d) is smoothed. The seasonal indices are applied to the results of the linear regression calculation. which produces the forecast results. SAP recommends that you enter a smoothing factor of ‘1‘.. S start (t) = V(t) / A k If a non-completed season exists that is. . 3.. n season Smoothing of the average seasonal indices e) If you have entered a smoothing factor in field PERSMO of the Univariate forecast profile.. 2.. s = 1. Linear regression is performed on the non-seasonal actual values. if n k is not an integer number the starting seasonal index s start (t) of the oldest historical data is calculated with the average A k of the n k th season. . Determination of the average seasonal index d) If k complete seasons are available. no seasonal influence is calculated and only linear regression is carried out.

Seasonal Trend 40 (or) 41 Forecast with Seasonal trend Model Definition: The following formula is used in forecast strategies 20. 40 and 41. Formula for First-Order Exponential Smoothing in a Trend. and in forecast strategies 50 to 56 where a trend. Seasonal or Seasonal Trend Model . The calculation takes into account both trend and seasonal variations. 30. seasonal or seasonal trend model is determined. 21. The basic value. 31. See also Model Initialization as well as the definition of exponential smoothing in the APO Glossary. the trend value and the seasonal index are calculated after the initial period.

.Use Use the trend. seasonal or seasonal trend model with first-order exponential smoothing for time series that have trend-like patterns and/or seasonal variations.

the default factors of 0. Choose this strategy if you think that there is a trend pattern in your historical data. The settings in the demand planning desktop if these are different than the ones in the Univariate profile. If you have made no settings either in the Univariate profile or on the demand planning desktop.3 are used. If you have made no settings either in the Univariate profile or on the demand planning desktop. the system runs the forecast as if the data revealed as a constant pattern. Automatic model selection 51 Forecast with automatic model selection Test for trend using model selection procedure 1 See also Automatic Model Selection Procedure 1 (Attached in the previous column). seasonal and seasonal trend patterns. The system tests the historical data for constant. and if you know that there is no other pattern. trend. trend.docx .3 are used. The settings in the demand planning desktop if these are different than the ones in the Univariate profile.docx    The smoothing factors are taken from the Univariate profile. Automatic Model Selection Procedure 1. The system applies the model that corresponds most closely to the pattern detected. the system runs the forecast as if the data revealed a constant pattern. If no regular pattern is detected. the default factors of 0.Automatic model selection 50 Forecast with automatic model selection Test for constant. In this process. the alpha. The system subjects the historical values to a regression analysis and checks to see whether there is a significant trend pattern. beta and gamma factors are determined as follows: Automatic Model Selection Procedure 1. seasonal and seasonal trend (model selection procedure 1) Choose this strategy if you have no knowledge of the patterns in your historical data. The alpha and beta factors are determined as follows:    The smoothing factors are taken from the Univariate profile. If not.

The system clears the historical values of any possible trends and carries out an autocorrelation test. a trend model. It also clears the historical values of any possible trends and carries out an autocorrelation test to see whether there is a significant seasonal pattern. seasonal model or seasonal trend model is used. beta and gamma factors are determined as follows:    Automatic Model Selection Procedure 1. If you have made no settings either in the Univariate profile or on the demand planning desktop. Automatic model selection 53 Forecast with automatic model selection Test for Trend and Season using model selection procedure 1 Choose this strategy if you think that there is a seasonal and/or a trend pattern in your historical data.Automatic model selection 52 Forecast with automatic model selection Test for Season using model selection procedure 1 Choose this strategy if you think that there is a seasonal pattern in your historical data. the default factors of 0. If no seasonal pattern is detected.3 are used. The system subjects the historical values to a regression analysis and checks to see whether there is a significant trend pattern. and if you know that there is no other pattern. If no regular pattern is detected. If a seasonal and/or trend pattern is detected. the system runs the forecast as if the data revealed a constant pattern. the system runs the forecast as if the data revealed a constant pattern. The alpha. . the default factors of 0. The settings in the demand planning desktop if these are different than the ones in the Univariate profile.3 are used. The alpha and gamma factors are determined as follows: Automatic Model Selection Procedure 1.docx    The smoothing factors are taken from the Univariate profile. The settings in the demand planning desktop if these are different than the ones in the Univariate profile.docx The smoothing factors are taken from the Univariate profile. If you have made no settings either in the Univariate profile or on the demand planning desktop.

See also Automatic Model Selection Procedure 1. beta and gamma factors are determined as follows:    Automatic Model Selection Procedure 1.Manual model selection with test for an additional pattern 54 Seasonal model and test for trend (model selection procedure 1) Choose this strategy if you think that there is a trend pattern in your historical data.3 are used. beta and gamma factors are determined as follows:    Automatic Model Selection Procedure 1. a trend model is used. Otherwise. See also Automatic Model Selection Procedure 1. If there is. Manual model selection with test for an additional pattern 55 Trend model and test for seasonal pattern (model selection procedure 1) Choose this strategy if you think that there is a seasonal pattern in your historical data. If you have made no settings either in the Univariate profile or on the demand planning desktop. The alpha. the default factors of 0. a seasonal trend model is used. a seasonal trend model is used. Otherwise. a seasonal model is used. . The settings in the demand planning desktop if these are different than the ones in the Univariate profile. The alpha. and if you know that there is a seasonal pattern. The settings in the demand planning desktop if these are different than the ones in the Univariate profile. The system clears the historical values of any possible trends and carries out an autocorrelation test. If the test is positive.3 are used. The system subjects the historical values to a regression analysis and checks to see whether there is a significant trend pattern. and if you know that there is a trend pattern.docx The smoothing factors are taken from the Univariate profile.docx The smoothing factors are taken from the Univariate profile. the default factors of 0. If you have made no settings either in the Univariate profile or on the demand planning desktop.

The system then chooses the model with the lowest mean absolute deviation (MAD). Second. seasonal and seasonal trend patterns. Copy History 60 Historical data used as a Forecast Data Choose this strategy if demand does not change at all and you want to opt for the least performance. trend value and/or seasonal indices yourself Manual forecast 70 Manual Forecast Croston 80 Croston Model Choose this strategy if demand is sporadic Definition The Croston method is a forecast strategy for products with intermittent demand. Instead. the average interval between demands is calculated. the historical data from the previous year is copied.Automatic model selection 56 Model selection procedure 2 Choose this strategy if you wish highly detailed tests of the historical data to be carried out. No forecast is calculated. Procedure 2 is more precise than procedure 1.5 in intervals of 0. The Croston method consists of two steps. In the Univariate forecast profile. First. . The system tests for constant.1.or work-intensive strategy. beta. Choose this strategy if you wish to set the basic value.1 and 0. trend. separate exponential smoothing estimates are made of the average size of a demand. and gamma smoothing factors where the factors are varied between 0. using all possible combinations for the alpha. but takes longer time. choose forecast strategy 80.

One example might be demand for spare parts or equipment that is usually ordered in batches to replenish downstream inventories. with many or even most time periods having no demand. random or sporadic demand. where demand does occur. Such demand patterns are known as "lumpy demand" or intermittent. independently or almost independently of the demand interval. the historical data is randomly distributed. this method almost always produces inappropriate stock levels. however.Use Exponential smoothing is often used to forecast demand in stock control systems. irregular. . The Croston method is suitable if demand appears at random. No ex-post forecast is calculated with this forecast strategy. If demand is intermittent.

The ordinary least squares method is used. where a and b are constants.Linear Regression Simple Linear Regression 94 The system calculates a line of best fit for the equation y = a + bx. FORECAST ACCURACY MEASUREMENT / EVALUATION CRITERIA Monitoring of Forecast Accuracy Purpose You monitor forecast accuracy:    To find out whether you are using the right forecast models To identify what adjustments are needed to the forecast models To project expected deviation from the planned forecast APO offers the following ways to monitor forecast accuracy:      Statistical error analysis Univariate forecast error measurements Multiple linear regression model measures of fit Planned/actual comparison Viewing purpose-designed KPIs with a BW front end (BW is the SAP Business Information Warehouse) Statistical Error Analysis Purpose .

promotion and distribution. The following forecasts would be seen in the month of March: January Forecast Prev Month -2 Month 3 Month Rolling December's forecast for January November's forecast for January November’s forecast for Nov+Dec+Jan January's forecast for February December's forecast for February December’s forecast for Dec+Jan+Feb February March March's forecast for March February's forecast for March January's forecast for March January’s forecast for Jan+Feb+Mar Include this information in your data view. product life cycle. This comprehensive understanding will enhance the quality of the corrected historical data and ensure that projections are kept in context. and a third macro that stores for a given month the sum of three months' forecasts ending with the forecast for that month.Statistical error analysis is a technqiue used in forecast accuracy reporting. you might have one macro that stores for a given month what was forecasted in the prior month. A series of previous forecasts for a particular period is stored and each deviation of this series is compared to the actuals for the same period. 1. stock. it enables your company to evaluate future scenarios for maximum. The real impact of forecast accuracy reporting is realized when coupled with a simulation at the significant nodes of the supply chain. This visualization of expected deviation not only places the forecast in context. and activities relating to pricing. and cash flow. the product. See also Forecast Storage. Prerequisites The analyst must have a comprehensive understanding of the both the historical and projected business environment including market behavior. a second macro that stores for a given month what was forecasted two months prior to that month. For example. Otherwise. In Demand Planning. planned and minimum production volumes. use macros for this purpose. for S&OP. it also enables "what if" planning. In addition the analyst should understand the business constraints relating to supply. in particular. production and distribution. competitor activity. You have stored the forecasts from previous periods. . For example. The deviation can then be projected into the future. sales revenue. create a separate data view. if you wish to use it while forecasting.

The actual consumption for the month of November was 150 units. Process Flow 1. and business issues like previous stock transfers. 3. Review the corrected history to validate that it makes sense in the business context.2. if the cumulative procurement lead time for the significant components is only one month. 2. it may not make sense to include errors generated by forecasts prior to one month. In this example. previous promotion impacts removed. This would lead to unnecessary contingency in the forecast projections. Month August (-3) Units forecast for November 100 Actual sales % Error compared to actual sales -33 September (-2) 110 -27 October (-1) 120 -20 November (1) 150 3. Run standard macros to calculate the forecast errors. the errors from months (-3) and (-2) should therefore not be included in any statistical average calculation as they would make the forecast error worse. You have corrected history such that outliers are suppressed. Review the business dynamics and decide which data range is relevant. refurbishments and so on. a product has three original forecasts for the month of November. You have updated your historical data by loading actuals for the period(s) just completed. In the table below. as strictly they are irrelevant from a procurement standpoint. For instance. are not counted as sales. .

Prerequisites You have installed the Alert Monitor.The % error for each of forecast is calculated as the percentage difference between the forecast and the actual. In the diagnostic group which you enter in the univariate profile. specify the upper limits of the forecast error measurements. you improve the accuracy of your univariate forecasts by monitoring predefined tolerance thresholds for the standard errors. In the Alert Monitor. Result An understanding by your company not only of the accuracy of the forecast. A positive error indicates an over-forecast while a negative error indicates an under-forecast. In the univariate forecast profile. Alert profiles are used to display specific alerts to specific users. Analysis of Univariate Forecast Errors Purpose In this process. create a forecast alert profile. set which forecast error measurements you want to be calculated. but also of how to provide for the variance. 3. . Process Flow 1. and by adjusting the forecast model where any of these thresholds are exceeded. 2. Forecast errors by themselves reflect not just the quality of the forecast. The magnitude of the forecast error will depend greatly on industry. They do not affect whether or not alerts are created. product complexity and market dynamics. but also the volatility of the business dynamics.

Specify in the mass processing activity that alerts are to be created. . Study the alerts to see if the adjustments you made in step 8 have corrected the problem. Open the Alert Monitor by choosing Supply Chain Monitoring  Alert Monitor from the SAP Easy Access menu. see * below). Check the alerts to see if any forecast errors have exceeded their predefined upper limits. You can view them on the Forecast errors tabstrip of the statistical forecast view.4. Check the alerts. If necessary. select Forecast deletes old alerts automatically. To compare the forecast errors with those of other models. The forecast errors that you set in the univariate profile are calculated automatically. 8. In interactive demand planning (for mass processing. 5. Run the forecast in the background as a mass processing job. continue as follows at step 4. From the workspace toolbar. 6. Run the forecast in the statistical forecast view. If necessary. * If you are forecasting in the background. make adjustments to the univariate forecast profile or use a different profile. 6. 5. assign the alert profile you created in step 3 by choosing Edit → Assign alert profile. 10. Repeat steps 5 through 8 as often as necessary. If desired. repeat steps 8 through 10. 8. 4. 11. 7. 9. Make any necessary adjustments to the univariate forecast model. choose Alerts on/off . look at the different forecast versions by choosing Settings  Forecast comparison. 9. 7. Run the forecast again.

when a limit has been exceeded. the system issues an alert. You select them in the Univariate forecast profile. You can also select the forecast error measurements on the demand planning desktop. .Forecast Accuracy Measurements Definition Univariate forecasting allows you to measure the forecast error in six ways:       Mean absolute deviation (MAD) Error total (ET) Mean absolute percentage error (MAPE) Mean square error (MSE) Square root of the mean squared error (RMSE) Mean percentage error (MPE) The system calculates the forecast errors by comparing the differences between the actual values and the ex-post values. use the Diagnostic group in the Univariate forecast profile. To set upper limits for the forecast error measurements. under the Errors tab of the Forecast view. Use Use the forecast error measurements to help you evaluate the accuracy of the forecast.

MAD (Mean Absolute Deviation) Indicator The mean absolute deviation gives the mean average difference between the forecasted value and the historical value in the ex-post forecast. Mean Absolute Deviation (MAD) for Ex-Post Forecast Key to MAD Formula Mean Absolute Deviation for Forecast Initialization .

Error Total Key to Error Total Formula .Procedure If you wish the mean absolute deviation (MAD) to be displayed in the Forecast errors tab. set this indicator.

Key to MAPE Formula Procedure If you wish the mean absolute percentage error (MAPE) to be displayed in the Forecast errors tab.Mean Absolute Percent Error (MAPE) Definition Is the mean absolute percentage error between the forecasted value and the historical value in the ex-post forecast. set this indicator .

MPE (Mean Percentage Error) Indicator MPE Is the mean percentage error between the forecasted value and the historical value in the ex-post forecast. set this indicator. . Key to MPE Formula Procedure If you wish the mean percentage error (MPE) to be displayed in the Forecast errors tab.

set this indicator. .MSE (Mean Square Error) Indicator Is the mean square error between the forecasted value and the historical value in the ex-post forecast. Key to MSE Formula Procedure If you wish the mean square error (MSE) to be displayed in the Forecast errors tab.

set this indicator.RMSE (Root of the Mean Square Error) Indicator Definition Is the root mean square error between the forecasted value and the historical value in the ex-post forecast. Key to RMSE Formula Procedure If you wish the root mean square error (RMSE) to be displayed in the Forecast errors tab. .