1 Forecasting
1 Forecasting
Module
FORECASTING
I. Objectives
The objectives of the practicum are:
1. Understand the basic concepts and principles in forecasting.
2. Analyze and apply the right forecasting models based on demand pattern.
3. Compare between forecasting model’s results.
4. Calculate measures of forecasting accuracy and interpret the result.
There are four main laws of forecasts (Bozarth & Handfield, 2016):
1. Forecasts are almost always wrong.
Even under the best of conditions, no forecasting approach can predict
the exact level of future demand, supply, or price. There are simply too many
factors that can ultimately affect these numbers. Rather, businesses should use
forecasting methods to get close estimates.
2. Forecasts for the near-term tend to be more accurate.
In near-term forecasts, the factors that affect the forecast variable are not
likely to change greatly. Main example for this law is gas prices. Given your
understanding of current economic and political conditions as well the current
price, you may feel reasonably comfortable predicting the price of gas for the
next period. However, what about 10 or 20 years from now? The effect of
variables could radically affect the price of gas in the long-term, including the
technological breakthroughs, demographic changes, and more.
3. Forecasts for groups of products or services tend to be more accurate.
Forecast for groups (aggregate) of products or services tend to be easier
and more accurate that it is to forecast for specific ones. This happens because
the demand, supply, or price of a specific item is usually affected by many
more factors. For example, the demand for dark green cars versus all cars.
Color fashion may affect the precise demand for green cars. However, when
looking at the overall demand, the impact of color fashion disappears. Higher
or lower demand for green cars is balanced out by demand for cars of other
colors. On a percentage basis, the error made in forecasting sales for an entire
product line is generally less than the error made in forecasting sales for an
individual item.
4. Forecasts are no substitute for calculated values.
Forecasts should be used only when better approaches to determining
the variable of interest are not available. To see what can go wrong when this
law is not followed, consider the experiences of a plant visited by one of the
authors. The plant made rubber products. Every Wednesday, the management
team would determine how many of each product would be made in the
coming week. From this production plan, the plant’s buyers could have easily
calculated exactly how much and what grades of war rubber would be needed.
Instead, the buyers chose to forecast rubber requirements. As a result,
sometimes the plant had too much rubber on hand, and at other times, it did
not have enough. In effect, the plant forecasted demand when it would have
been simpler and more accurate to calculate demand.
A company must understand such factors before it can select an
appropriate forecasting methodology. Figure 1.2 provides a road map to help
analyst figure the most appropriate forecasting methods. Forecasting methods
are classified according to the following types (Bozarth & Handfield, 2016):
I. Qualitative Method
Qualitative forecasting method are forecasting methods based on
intuition or informed opinion. These methods are best used when historical
data are scarce, not available, of irrelevant.
• Market Surveys
Structured questionnaires submitted to potential customers. They
solicit opinions about product or potential products and often attempt to
estimate likely demand. A major drawback is that market surveys tend
to be expensive and time-consuming to perform.
B. Demand pattern
Analyzing time series means breaking down past data into components and
then projecting them forward. A time series has four components (Heizer, Render,
& Munson, 2017):
a. Level or Horizontal Pattern
The pattern has no trend and is stationary, the next value will be above
the mean or below it. This pattern can be represented by stable sales and
number of defects in production process.
b. Trend Pattern
Gradual upward or downward movement of the data over time.
c. Seasonal Pattern
Data pattern that repeats itself after a period of days, weeks, months, or
quarters. Seasonality that occurs for more than a year’s period can also mean
a cycle pattern.
d. Cyclical Pattern
Patterns in the data that occur every several years. They are usually tied
into the business cycle and are of major importance in short-term business
analysis and planning.
Ft+1 = Dt
Where:
Ft+1 = Forecast for the next periode, t + 1
Dt = Demand for the current period, t
2. Moving Average
A Moving Average model derives a forecast by taking an average of
a set of recent demand values. By basing the forecast on more than one
observed demand value, the moving average model is less susceptible to
random swings in demand (Bozarth & Handfield, 2016). Another
perspective is a Moving Average model is used when demand has no
observable trend or seasonality. In the case, demand forecast is stated as
(Reid & Sanders, 2010):
∑ni=1 Dt+1-i
Ft+1 =
n
Where:
Ft+1 = Forecast for time period t+1
Dt+1-i = Actual demand for period t+1-i
n = Number of most recent demand observations used to develop
the forecast
Which is better? The shorter period or the longer period model used
in moving average model Generally speaking, it depends on the raw data.
The more randomness there is in the raw data, the more attractive the
smoothing and delayed reaction characteristics are. Longer period models
in moving average would be preferable in such a case, because long period
moving average models are more stable rather than short period moving
average models.
On the other hand, if rises or falls in demand are not random but
really do indicate changes in the underlying demand pattern, then a more
reactive and responsive model is more preferred. Short period moving
average models are better used in this case (Bozarth & Handfield, 2016).
3. Exponential Smoothing
The exponential smoothing model is a special form of the moving
average model in which the forecast for the next period is calculated as the
weighted average of the current period’s actual value and forecast (Bozarth
& Handfield, 2016)
a. Simple Exponential Smoothing
Simple exponential smoothing model is best used when there
seems to be no observable trend or seasonality.
The general rule for determining the α value is: the greater the
randomness in the time series data is, the lower the α value should be.
Conversely, the less randomness in the time series data, the higher the
α value should be. Higher α value means more responsiveness.
FITt = Ft + Tt
Ft = α(At-1) + (1-α).(Ft-1+Tt-1)
Where:
FITt = Forecast including trend in period t
Ft = Exponentially smoothed forecast average in period t
Tt = Exponentially smoothed trend in period t
At = Actual demand in period t
α = Smoothing constant for the average (0 ≤ α ≤ 1)
β = Smoothing constant for the trend (0 ≤ β ≤ 1)
â and b̂ are estimated using the raw time series data for variable y
(the dependent variable) and variable x (the independent variable):
[∑ni=1 xi ][∑ni=1 yi ]
∑ni=1 xi yi -
b̂ = n
n
[∑ x ]2
∑ni=1 x2i - i=1 i
n
â = 𝑦̅ - ̂b𝑥̅
Where:
(xi, yi) = matched pairs of observed (x, y) values
𝑦̅ = average y value
𝑥̅ = average x value
n = number of paired observations
Ct = γ.(Dt/St) + (1 – γ) . Ct-N
D. Forecast Accuracy
As mentioned by Chopra & Meindl (2010), every instance of demand
has a random component. A good forecasting method should capture the
systematic component of demand but not the random component. The random
component manifests itself in the form of a forecast error. This forecast error
can show us how much we can rely on this forecast that we have made before.
The forecast accuracy can be measured by following method (Render, Stair,
& Hanna, 2018):
∑nt=1|Dt -Ft |
MAD =
n
Where:
Ft : Forecast in period t
Dt : Demand in period t
n : Number of errors
Where:
Ft : Forecast in period t
Dt : Demand in period t
n : Number of errors
|Ft -Dt |
∑nt=1
Dt
MAPE = x 100%
n
Where:
Ft : Forecast in period t
Dt : Demand in period t
n : Number of errors
4. Tracking Signal
It measures that if your model is working or not. The formula is as
following:
If the TS at any period is outside the range ±4, this is a signal that
the forecast is biased and is either under forecasting (TS ≤ -4) or over
forecasting (TS ≥ +4). In this case, a firm may decide to choose a new
forecasting method (Bozarth & Handfield, 2016).
III. Procedure
A. Case Example for Forecasting
Company XYZ is a new company that produce cotton shirts. The sales
of cotton shirts from 2 years lately become stable. Then, the marketing and
sales division had collected sales data for the production planning for one year
ahead and gave the data to the production division to determine the production
planning which start by using demand forecasting.
The table below is the sales data of train toys from January 2018 to
December 2019:
Table 1.1 Data Sales
No Period Sales No Period Sales
1 January 2018 1273 13 January 2019 1848
2 February 2018 1333 14 February 2019 1992
3 March 2018 1618 15 March 2019 1919
4 April 2018 1739 16 April 2019 1729
5 May 2018 1513 17 May 2019 1802
6 June 2018 1449 18 June 2019 1999
7 July 2018 1584 19 July 2019 2111
8 August 2018 1748 20 August 2019 1992
9 September 2018 1840 21 September 2019 1916
10 October 2018 1675 22 October 2019 1996
11 November 2018 1534 23 November 2019 2146
12 December 2018 1735 24 December 2019 2308
Remark:
The sales data on each month added with 2 last digits from group members’
student ID number.
Example: ABC xxxxxxxx22
DEF xxxxxxxx25
GHI xxxxxxxx63
2. Create a table with the name of column is number, period, sales, CMA,
dt bar, seasonal, forecast, error, MSE, ABS error, % error, MAPE, MAD,
bias, and TS. We will forecast for the next 12 Months from January 2020
until December 2020 (ignoring pandemic situation), so input the period
column from January 2018 until December 2019.
3. Copy the sales result from step number 1 to sales column in worksheet
from step number 2.
4. Make a graph for demand or sales data from January 2018 until
December 2019 by blocking the number and sales cells → insert → charts
→ scatter charts. The result is (chart can be chosen as preferred):
Sales Plot
3000
2500
2000
1500
1000
500
0
0 5 10 15 20 25 30
6. Calculate level and trend, for the level find a value with formula
=INTERCEPT(Known y, Known x) and for the trend use
Note: use F4 to lock the cells holding the value of level and trend for
easier formula-dragging in excel. Lock in excel symbolized by “$”.
10. Find the forecast for January 2018 until December 2020 by multiplying
dt bar with the corresponding seasonal (S) value. Example, for dt bar
number 1, multiply with S1, number 2 with S2, number 3 with S3, etc.,
and repeat by multiplying number 6 with S1, and so on. Use formula
=ROUNDUP(dtbar*Seasonal,0).
11. Calculate the error value between sales data history and forecast value
from January 2018 until December 2019 with formula =sales column-
forecast column.
13. Find the absolute error from error column. Use formula =ABS(error
column).
14. Calculate %error by dividing between ABS error and sales data then
multiply with 100.
Table 1.7 TSD Worksheet 3
No Period Sales CMA dt bar Seasonal Forecast Error MSE ABS Error % Error MAPE MAD Bias TS
1 Jan-18 1383 1559.06 0.89 1422 -39 1521 39 2.82
2 Feb-18 1443 1588.14 0.91 1520 -77 3725 77 5.34
3 Mar-18 1728 1605.2 1617.23 1.07 1683 45 3158.33 45 2.60
4 Apr-18 1849 1640.4 1646.31 1.12 1794 55 3125 55 2.97
5 May-18 1623 1690.6 1675.39 0.97 1666 -43 2869.8 43 2.65
6 Jun-18 1559 1716.6 1704.47 0.91 1554 5 2395.67 5 0.32
7 Jul-18 1694 1736.8 1733.56 0.98 1659 35 2228.43 35 2.07
8 Aug-18 1858 1769.2 1762.64 1.05 1834 24 2021.88 24 1.29
9 Sep-18 1950 1786.2 1791.72 1.09 1953 -3 1798.22 3 0.15
10 Oct-18 1785 1816.4 1820.80 0.98 1811 -26 1686 26 1.46
11 Nov-18 1644 1836.4 1849.89 0.89 1687 -43 1700.82 43 2.62
12 Dec-18 1845 1866.8 1878.97 0.98 1798 47 1743.17 47 2.55
13 Jan-19 1958 1915.6 1908.05 1.03 1986 -28 1669.38 28 1.43
14 Feb-19 2102 1954.6 1937.13 1.09 2111 -9 1555.93 9 0.43
15 Mar-19 2029 1968 1966.22 1.03 1955 74 1817.27 74 3.65
16 Apr-19 1839 1998.2 1995.30 0.92 1820 19 1726.25 19 1.03
17 May-19 1912 2022 2024.38 0.94 1937 -25 1661.47 25 1.31
18 Jun-19 2109 2036.6 2053.46 1.03 2137 -28 1612.72 28 1.33
19 Jul-19 2221 2074 2082.55 1.07 2270 -49 1654.21 49 2.21
20 Aug-19 2102 2112.8 2111.63 1.00 2100 2 1571.7 2 0.10
21 Sep-19 2026 2142.2 2140.71 0.95 1952 74 1757.62 74 3.65
22 Oct-19 2106 2181.6 2169.79 0.97 2076 30 1718.64 30 1.42
23 Nov-19 2256 2198.88 1.03 2288 -32 1688.43 32 1.42
24 Dec-19 2418 2227.96 1.09 2428 -10 1622.25 10 0.41
25 Jan-20 2257.04 2244
26 Feb-20 2286.12 2085
27 Mar-20 2315.21 2215
28 Apr-20 2344.29 2439
29 May-20 2373.37 2587
30 Jun-20 2402.45 2389
31 Jul-20 2431.54 2217
32 Aug-20 2460.62 2354
33 Sep-20 2489.70 2591
34 Oct-20 2518.78 2745
35 Nov-20 2547.87 2533
36 Dec-20 2576.95 2350
17. Calculate bias column with cumulative summation from error column
until December 2019, using formula =SUM($firsterror$cells:error
column for t period). Drag down the formula.
2. Create a table with the name of column is number, period, sales, forecast,
error, MSE, ABS error, % error, MAPE, MAD, bias, and TS. We will
forecast for the next 12 Months from January 2020 until December 2020,
so input the period column from January 2018 until December 2019.
3. Copy the sales result from step number 1 to sales column in worksheet
from step number 2.
4. Calculate the forecast value from the fifth period (May 2018) until the
last period (December 2019) by summing up previous period sales and
divide them with n, where n is the number of periods used. For example,
we can use the formula =ROUNDUP(((sales value at t period+sales
value at t+1 period+sales value at t+2 period+sales value at t+3
period)/4),0). Another simpler formula is
=ROUNDUP(AVERAGE(previous sales:previous sales at t-1);0)
5. Calculate the error value between sales data history and forecast value
from May 2018 until December 2019 with the formula: =sales cell-
forecast cell
8. Calculate %error by dividing ABS error with sales data, then multiply
with 100.
11. Calculate bias column by doing cumulative summation from the error
column. Use Formula =SUM($first error$cell:error cell).
12. Calculate TS (Tracking Signal) by dividing bias cells with MAD cells.
Note: We can see the value of the last tracking signal is above ±4,
meaning the forecast result may be biased or not accurate. Based
from known theory, since the history sales plotting has a fixed
seasonality and trend pattern, a smaller moving average period
maybe more accurate because of its responsiveness. If we use a
moving average with 2 period, the result of the last tracking
signal value is -8.41, still not accurate but it is actually better
than the four-period moving average. Know the pattern before
using a forecast method. You can even try to calculate two-
period moving average to hone your skills at excel.
2. Create a table with the name of columns are number, period, sales, level,
trend, forecast, error, MSE, ABS error, % error, MAPE, MAD, bias, and
TS. We’ll try to forecast for the next 12 Months from January 2020 until
December 2020. Input the number and period columns from January
2018 until December 2019.
3. Copy the sales result from table 1.11 to sales column in the worksheet.
5. After finding level’s and trend’s value for t=0, find their value for the
next period until the last sales data history. Calculate the level value by
using the formula =(α x period t sales) + ((1-α) x (previous period of
level + previous period of trend)). Next, calculate the trend value by
using formula = β x (period t level - the previous period level) + ((1-β)
x previous period of trend). Note that α and β values must be locked
when doing calculation.
7. Calculate the error value between sales data history and forecast value
from January 2016 until December 2017 with formula = sales-forecast.
9. Find absolute error from error column. Use formula =ABS(error cell).
10. Calculate %error by dividing ABS error with sales data, then multiply
with 100.
12. Find MAD (Mean Absolute Deviation) by averaging error column, using
formula =AVERAGE($first ABS error$cell:ABS error cell).
13. Calculate bias column by doing cumulative summation from the error
column. Use Formula =SUM($first error$cell:error cell).
Note: In this example, the α and β value used are 0.1 and 0.1,
respectively.
2. Create table with the name of columns are number, period, sales, level,
trend, seasonal, forecast, error, MSE, ABS error, % error, MAPE, MAD,
bias, and TS. We will try to forecast for the next 12 Months from January
2020 until December 2020. Input the period column from January 2018
until December 2019.
3. Determine the alpha (α), beta (β), and gamma (γ) value to be used, then
copy S1-S5 value from the TSD method. In this example, we’ll use a 0.5
value for all α, β, and γ.
Table 1.14 Alpha, Beta, Gamma, and S Value
S1 0.911701718
S2 0.956559401
S3 1.040359853
S4 1.089669416
S5 0.994109168
5. Copy the S1-S5 value to seasonal column for the first period until the
fifth period. Use 2 decimals after comma.
Table 1.15 S Value
0.91
0.96
1.04
1.09
0.99
6. After calculating the level and trend value for t=0, now calculate their
value for the next period until the last sales data history. Calculate the
level value first by using the formula =(α x (sales/seasonal)) + ((1-α) x
(previous period of level + previous period of trend)). Next, calculate
the trend value using formula = (β x (level at period t - the previous
period level)) + ((1-β) x previous period of trend). Note that alpha and
beta values must be locked when doing calculation.
7. Calculate seasonal value for the sixth period until 25th period by using
formula =(γ x (sales 1st period/level at 1st period)) + ((1-γ) x S1) then
drag the result until 25th period.
10. Calculate the error value between sales data history and forecast value
from January 2018 until December 2018 with formula = sales-forecast.
12. Find absolute error from error column. Use formula =ABS(error cell).
13. Calculate %error by dividing ABS error with sales data, then multiply
with 100.
14. Find MAPE (Mean Absolute Percentage Error) by averaging the %error,
using formula =AVERAGE($first %error$cell :error cell at t period).
15. Find MAD (Mean Absolute Deviation) by averaging the ABS error,
using formula =AVERAGE($first ABS error $cell:error cell at t
period).
16. Calculate bias column with cumulative summation from error column
until December 2019, by using formula =SUM($first error $cell:error
cell at t period).
F. Disaggregate Forecasting:
Disaggregate forecast is used to find forecasting for component that are
divided to find the proportion of each component.
1. Example below is the demand for each period of each coloured pen which
will be used for disaggregate forecast.
2. Sum up the demand of each coloured pen per period by using formula =
SUM(Demand of Blue Pen at period t=1:Demand of Red Pen at
period t=1). Alternatively, the formula =(Demand of blue pen at period
t=1 + Demand of Black Pen at period t=1 + Demand of Red Pen at
period t=1) can be used.
Steps:
1. Using Minitab, copy all sales data of cotton shirt from January 2018 to
December 2019 and sum with 110 to all sales data
2. At the ribbon bar, select Stat > Time Series > Double Exponential
Smoothing.
3. In Variable, double click the column which hold the data that will be
forecasted.
4. In Weights to Use in Smoothing, select specified weights. Enter 0.1 for
level (α) and 0.1 for trend (β). If Optimal ARIMA is selected, Minitab
will use the weight that minimizes the sum of squared residuals in an
ARIMA (0,2,2) model. ARIMA stands for AutoRegressive Integrated
Moving Average. Never get too dependent at Optimal ARIMA function,
because sometimes our own specified weights can return smaller error
margins than the Optimal ARIMA itself.
5. Check Generate forecasts. In Number of forecasts, enter 12. Where 12
represent the number of forecast for the next 12 periods.
6. Click OK.
7. The result of Forecast by using Minitab:
Note that the calculations from Excel does not differ to far from the
Minitab results. If there are any difference however, it is usually caused by
the value in decimals and their multiplicative characteristics.