Sei sulla pagina 1di 51

Demand Forecasting

Dr. Mohammad Khaled Afzal


Outline
 Elements of a good forecast.
 Outline the steps in the forecasting process.
 Qualitative forecasting techniques and the advantages and
disadvantages of each.
 Briefly describe averaging techniques, trend and seasonal
techniques, and regression analysis, and solve typical
problems.
 Describe measures of forecast accuracy.
 Identify the major factors to consider when choosing a
forecasting technique.
 Collaborative Planning, Forecasting, and Replenishment

2
Forecasts
 A statement about the future value of a variable of
interest such as demand.
 Forecasting is used to make informed decisions.

 Long-range

 Short-range

3
Why Forecasts
 Forecasts affect decisions and activities throughout an
organization

Accounting Cost/profit estimates

Finance Cash flow and funding

Human Resources Hiring/recruiting/training

Marketing Pricing, promotion, strategy

MIS IT/IS systems, services

Operations Schedules, MRP, workloads

Product/service design New products and services

4
Why Forecasting Demand in SCM
 Match demand and supply to avoid
 stock out
 lost sales
 high costs of inventory and obsolescence
 material shortage
 poor responsiveness to market dynamics

 Single consensus forecast minimize bullwhip effect


 Collaboration between buyer and supplier become a rule
rather than exception
5
Sony Experience

 Sony had prior experience with launch of PlayStation

 A Sony Web site crashed due to unexpected 500,000


hits in just a few minutes when accepting order of PS2 in
late Feb, 2000
 In March 2000 sales of PS2 was 10 times of forecasted
sales.

6
How to Match Supply and Demand
Techniques
 Hold plenty of stock to satisfy uncertain pull
 Flexible pricing
 Overtime, subcontracting and temporary worker in the
short term
 Effective forecasting
 Collaboration Planning, Forecasting and Replenishment

7
Features of Forecasts

• Assumes causal system


past ==> future

• Forecasts are rarely perfect because of


randomness
I see that you will
• Forecasts more accurate for get an A this semester.
groups than individuals

• Forecast accuracy decreases


as time horizon increases
8
Elements of a Good Forecast

9
Steps in the Forecasting Process

“The forecast”

Step 6 Monitor the forecast


Step 5 Make the forecast
Step 4 Obtain, clean and analyze data
Step 3 Select a forecasting technique

Step 2 Establish a time horizon

3-10
Step 1 Determine purpose of forecast

Forecasting Techniques
Qualitative forecasting: methods of using opinions
and intuition- subjective approach
1. Jury of executive opinion
2. Delphi method etc.
3. Sales force opinion
4. Consumer surveys
 Quantitative forecasting : methods of using
mathematical models and historical data
1. Time series models
i. Static models
ii. Adaptive models
i. Simple moving average
ii. Weighted moving average
iii. Exponential smoothing
2. Regression Analysis etc.
11
Qualitative Forecasting

 When data are limited, unavailable or not currently relevant

 When long range projection is necessary

 Very low cost

 Effectiveness depends on the skill and experience

12
Qualitative Forecasting
1. Jury of executive opinion
• A panel of senior experienced executive forecasts
• Dominance may diminish effectiveness
• Sports Obermeyer averages the weighted individual forecast of
each committee member
2. Delphi Method
• A group of internal and external experts were surveyed
• Members do not physically meet so no dominance problem
• Answers of each round survey are accumulated and summarized
and then resend to every participants for review until consensus
is reached
• The method is time consuming and expensive
13
Qualitative Forecasting

3. Sales force composite


• Proximity gives good forecast
• May be biased if target or salary related to the forecast
4. Consumer survey
• Questionnaire survey over telephone, mail, internet or personal
interviews
• The challenge is to identify the sample respondents.

14
Quantitative Methods
 Time series forecasting: Future is an extension of past
 Components are time variations, cyclical variations, seasonal
variations, and random variations
 Techniques:
 Static
 Adaptive

 Associative forecasting (regression): One or more factors


(independent variables) are related to demand

15
Forecast Variations

Irregular
variation

Trend

Cycles

90
89
88
Seasonal variations

16
Components of an Observation
Observed demand (O) =
Systematic component (S) + Random component (R)

Level (current deseasonalized demand)

Trend (growth or decline in demand)

Seasonality (predictable seasonal fluctuation)

17
Components of an Observation
• Systematic component: Expected value of demand
• Random component: The part of the forecast that deviates
from the systematic component
• Forecast error: difference between forecast and actual
demand
• Goal is to predict systematic component of demand
Multiplicative: (level)(trend)(seasonal factor)
Additive: level + trend + seasonal factor
Mixed: (level + trend)(seasonal factor)
18
Static Methods
 A static method assumes that the estimates of level, trend, and
seasonality within the systematic component do not vary as
new demand is observed.
 Assume a mixed model:
Systematic component = (level + trend)(seasonal factor)
Ft+l = [L + (t + l)T]St+l
L = Estimate of level for period 0
T = Estimate of trend
St = Estimate of seasonal factor for period t
Dt = Actual demand in period t
Ft = Forecast of demand in period t

19
Static Methods

Required Computation Before Forecasting


 Estimating level and trend from time series data
 Estimating seasonal factors

20
Time Series Forecasting
Quarter, Year Demand Dt
II, 1 8000
III, 1 13000
IV, 1 23000
I, 2 34000
II, 2 10000
III, 2 18000
IV, 2 23000
I, 3 38000
II, 3 12000
III, 3 13000
IV, 3 32000
I, 4 41000
21 Forecast demand for the next four quarters.
Estimating Level and Trend
 Before estimating level and trend, demand data must
be deseasonalized
 Deseasonalized demand = demand that would have been
observed in the absence of seasonal fluctuations
 Periodicity (p)
 the number of periods after which the seasonal cycle
repeats itself

22
Static Methods
Deseasonalizing Demand (Dt )

[Dt-(p/2) + Dt+(p/2) + S 2Di] / 2p for p even


Dt = (sum is from i = t+1-(p/2) to t-1+(p/2))

S Di / p for p odd
(sum is from i = t-(p/2) to t+(p/2)), p/2 truncated to lower integer

23
Static Methods
Deseasonalizing Demand

For the example, p = 4 is even


For t = 3:
D3 = {D1 + D5 + Sum(i=2 to 4) [2Di]}/8
= {8000+10000+[(2)(13000)+(2)(23000)+(2)(34000)]}/8
= 19750
D4 = {D2 + D6 + Sum(i=3 to 5) [2Di]}/8
= {13000+18000+[(2)(23000)+(2)(34000)+(2)(10000)]/8
= 20625

24
Static Methods
Deseasonalizing Demand
Then use the following linear regression model
Dt = L + tT
where Dt = deseasonalized demand in period t
L = level (deseasonalized demand at period 0)
T = trend (rate of growth of deseasonalized demand)
t = period
Trend and Level is determined by linear regression using:
deseasonalized demand as the dependent variable, and
period as the independent variable (can be done in Excel)
In the example, L = 18,439 and T = 524
25
Static Methods
Measuring Linear trend
Linear Regression Model
 Fitting simple linear regression line to a time series data.
^
Y = a + b X  Dt = L + T . t
Where
Y / Dt = dependent variable / deseasonalized demand /Estimate
X / t = Independent variable /time variable
a / L= Intercept of the line and
b / T = Slope of the line
n =number of period
_
 ( t Y) n t Y
b or T = 2 _ 2
t n t

b or L= Y  bt
Static Methods
Linear Trend Calculation Example
Adjusted 4 Avg.
4 period Estimated Seasonal
Period Quarter Demand Yrs Moving t^2 ty Seasonal
moving average Demand index
Avg Index
1 II, 1 8000 18963 0.42 0.47
Deseasonaliz
ed demand
2 III, 1 13000 19487 0.67 0.68
19500
3 IV, 1 23000 19750 9 59250 20010 1.15 1.17
20000
4 I, 2 34000 20625 16 82500 20534 1.66 1.66
21250
5 II, 2 10000 21250 25 106250 21058 0.47 0.47
21250
6 III, 2 18000 21750 36 130500 21582 0.83 0.68
22250
7 IV, 2 23000 22500 49 157500 22106 1.04 1.17
22750
8 I, 3 38000 22125 64 177000 22629 1.68 1.66
21500
9 II, 3 12000 22625 81 203625 23153 0.52 0.47
23750
10 III, 3 13000 24125 100 241250 23677 0.55 0.68
24500
11 IV, 3 32000 24201 1.32 1.17

12 I, 4 41000 24725 1.66 1.66


Sum t Sum y Sum t^2 Sum ty
Total 52 174750 174750 380 1157875
n= 8
Average of t 6.5 21843.75
corresponding
to
deseasonalize
d demand 27
Static Methods
Linear Trend Calculation

 ( t Y) _ n t Y = 523.81
b or T =
 t
2 _ n t 2

b or L = Y  bt = 18439

Y = 18439 + 5.23 t

28
Static Methods
Estimating Seasonal Factors

Use the previous equation to calculate deseasonalized


demand for each period
St = Dt / Dt = seasonal factor for period t
In the example,
D2 = 18439 + (524)(2) = 19487 D2 = 13000
S2 = 13000/19487 = 0.67
The seasonal factors for the other periods are calculated in
the same manner

29
Static Methods
Estimating Seasonal Factors
t Dt Dt-bar S-bar
1 8000 18963 0.42 = 8000/18963
2 13000 19487 0.67 = 13000/19487
3 23000 20011 1.15 = 23000/20011
4 34000 20535 1.66 = 34000/20535
5 10000 21059 0.47 = 10000/21059
6 18000 21583 0.83 = 18000/21583
7 23000 22107 1.04 = 23000/22107
8 38000 22631 1.68 = 38000/22631
9 12000 23155 0.52 = 12000/23155
10 13000 23679 0.55 = 13000/23679
11 32000 24203 1.32 = 32000/24203
12 41000 24727 1.66 = 41000/24727
30
Static Methods
Estimating Seasonal Factors
 The overall seasonal factor for a “season” is then obtained by averaging
all of the factors for a “season”
 If there are r seasonal cycles, for all periods of the form pt+i, 1<i<p,
the seasonal factor for season i is
Si = [Sum(j=0 to r-1) Sjp+i]/r
In the example, there are 3 seasonal cycles in the data and p=4, so
S1 = (0.42+0.47+0.52)/3 = 0.47
S2 = (0.67+0.83+0.55)/3 = 0.68
S3 = (1.15+1.04+1.32)/3 = 1.17
S4 = (1.66+1.68+1.66)/3 = 1.67
31
Static Methods
Estimating the Forecast

Using the original equation, we can forecast the next four


periods of demand:

F13 = (L+13T)S1 = [18439+(13)(524)](0.47) = 11,868


F14 = (L+14T)S2 = [18439+(14)(524)](0.68) = 17,527
F15 = (L+15T)S3 = [18439+(15)(524)](1.17) = 30,770
F16 = (L+16T)S4 = [18439+(16)(524)](1.67) = 44,794

32
Static Methods
Adaptive Forecasting

 The estimates of level, trend, and seasonality are


adjusted after each demand observation
 Methods of adaptive forecasting
 Moving average
 Simple exponential smoothing
 Trend-corrected exponential smoothing (Holt’s model)
 Trend- and seasonality-corrected exponential smoothing
(Winter’s model)

33
Adaptive Time Series Forecasting Models
Moving Average method is used when demand has no observable trend
or seasonality.
1. Simple Moving Average Forecasting Model : A technique that averages a
number of recent actual values, updated as new values become available. Last forecast is
considered as forecast for all future periods for which data is still to release.
3 year moving average
n

A
Period Actual Forecasted
t i Demand Demand
Ft  MAn  i 1 1
2
1600
2200
n 3 2000
i = An index that corresponds to time period 4 1600 1933
n = Number of periods (data points) in the 5 2500 1933
6 3500 2033
moving average
7 3300 2533
At-i = Actual value in period t-i 8 3200 3100
MA= Moving average 9 3900 3333
Ft = Forecast for time period t 10 4700 3467
11 4300 3933
12 4400 4300
Adaptive Forecasting
Adaptive Time Series Forecasting Models
2. Weighted Moving Average Forecasting Model
 This models overcomes the question of Simple moving average method giving
equal weight in all years
 More recent values in a series are given more weight in computing the forecast.
 Last forecast is considered as forecast for all future periods for which
data is still to release.

Ft = WMAn= wnAt-n + … wn-1At-2 + w1At-1

Example: (previous data)


If weight in last year 5, previous year 3 and year before that 2, than the 3 years moving
average forecast is
F4= .2 (1600) + .3(2200) + .5(2000) = 1980

Adaptive Forecasting
Adaptive Time Series Forecasting Models
3. Exponential Smoothing Forecasting Model
 Weighted averaging method based on previous forecast plus a percentage of the forecast
error
 The next period’s forecasted demand is the current period’s forecast adjusted by a
fraction of the difference between the current’s period's actual demand and its forecast.
 Last forecast is considered as forecast for all future periods for which data is still to
release.
 Simple and Minimal data required
 Suitable for data that show little trend or seasonal patterns

Ft+1 = Ft + α (At – Ft) or Ft+1 = αAt + (1 – α)Ft


The more emphasis on recent data the higher value for Alpha.
Where
Ft+1 = Forecast for period t+1,
Ft = Forecast for period t,
At = Actual demand for period t, and
α = A smoothing constant (0 ≤ α ≤ 1)
Adaptive Forecasting
4. Basic Formula for Adaptive Forecasting (Trend
and/or season adjusted exponential smoothing)
Ft+1 = (Lt + lT)St+1 = forecast for period t+l in period t
Lt = Estimate of level at the end of period t
Tt = Estimate of trend at the end of period t
St = Estimate of seasonal factor for period t
Ft = Forecast of demand for period t (made period t-1 or earlier)
Dt = Actual demand observed in period t
Et = Forecast error in period t
At = Absolute deviation for period t = |Et|
MAD = Mean Absolute Deviation = average value of At

37
General Steps
 Initialize: Compute initial estimates of level (L0), trend (T0), and
seasonal factors (S1,…,Sp). This is done as in static forecasting.
 Forecast: Forecast demand for period t+1 using the general equation

 Estimate error: Compute error Et+1 = Ft+1- Dt+1

 Modify estimates: Modify the estimates of level (Lt+1), trend (Tt+1), and
seasonal factor (St+p+1), given the error Et+1 in the forecast
 Repeat steps 2, 3, and 4 for each subsequent period

38
Trend-Corrected Exponential Smoothing
(Holt’s Model)
 Appropriate when the demand is assumed to have a level and trend in the
systematic component of demand but no seasonality
 Obtain initial estimate of level and trend by running a linear regression of
the following form:
Dt = at + b
T0 = a
L0 = b
In period t, the forecast for future periods is expressed as follows:
Ft+1 = Lt + Tt
Ft+n = Lt + nTt

39
Trend-Corrected Exponential Smoothing
(Holt’s Model)
After observing demand for period t, revise the estimates for level and trend as follows:

Lt+1 = aDt+1 + (1-a)(Lt + Tt)

Tt+1 = b(Lt+1 - Lt) + (1-b)Tt

a = smoothing constant for level

b = smoothing constant for trend

Example: Tahoe Salt demand data. Forecast demand for period 1 using Holt’s model
(trend corrected exponential smoothing)

Using linear regression,

L0 = 12015 (linear intercept)

T0 = 1549 (linear slope)


7-40
Holt’s Model Example (continued)
Forecast for period 1:
F1 = L0 + T0 = 12015 + 1549 = 13564
Observed demand for period 1 = D1 = 8000
E1 = F1 - D1 = 13564 - 8000 = 5564
Assume a = 0.1, b = 0.2
L1 = aD1 + (1-a)(L0+T0) = (0.1)(8000) + (0.9)(13564) = 13008
T1 = b(L1 - L0) + (1-b)T0 = (0.2)(13008 - 12015) + (0.8)(1549)
= 1438
F2 = L1 + T1 = 13008 + 1438 = 14446
41
Trend- and Seasonality-Corrected
Exponential Smoothing (Winter’s Model)
 Appropriate when the systematic component of demand is assumed to
have a level, trend, and seasonal factor
 Systematic component = (level+trend)(seasonal factor)

 Assume periodicity p

 Obtain initial estimates of level (L0), trend (T0), seasonal factors


(S1,…,Sp) using procedure for static forecasting
 In period t, the forecast for future periods is given by:

Ft+1 = (Lt+Tt)(St+1) and Ft+n = (Lt + nTt)St+n

42
Trend- and Seasonality-Corrected Exponential
Smoothing (continued)
 After observing demand for period t+1, revise estimates for level, trend, and seasonal
factors as follows:

Lt+1 = a(Dt+1/St+1) + (1-a)(Lt+Tt)


Tt+1 = b(Lt+1 - Lt) + (1-b)Tt
St+p+1 = g(Dt+1/Lt+1) + (1-g)St+1
a = smoothing constant for level

b = smoothing constant for trend

g = smoothing constant for seasonal factor

Example: Tahoe Salt data. Forecast demand for period 1 using Winter’s model.
 Initial estimates of level, trend, and seasonal factors are obtained as in the static
forecasting case
43
Trend- and Seasonality-Corrected Exponential
Smoothing Example (continued)

L0 = 18439 T0 = 524 S1=0.47, S2=0.68, S3=1.17, S4=1.67


F1 = (L0 + T0)S1 = (18439+524)(0.47) = 8913
The observed demand for period 1 = D1 = 8000
Forecast error for period 1 = E1 = F1-D1 = 8913 - 8000 = 913

Assume a = 0.1, b=0.2, g=0.1; revise estimates for level and trend for period 1 and for
seasonal factor for period 5
L1 = a(D1/S1)+(1-a)(L0+T0) = (0.1)(8000/0.47)+(0.9)(18439+524)=18769

T1 = b(L1-L0)+(1-b)T0 = (0.2)(18769-18439)+(0.8)(524) = 485

S5 = g(D1/L1)+(1-g)S1 = (0.1)(8000/18769)+(0.9)(0.47) = 0.47

F2 = (L1+T1)S2 = (18769 + 485)(0.68) = 13093


44
Associative Forecasting Models
1. Simple regression

Y = b0 + b1x
Where
Y = Forecast or dependent variable
x = Explanatory or Independent variable
b0 = Intercept of the line and
b1 = Slope of the line

2. Multiple regression

Y = b0 + b1 x1+b2x2+ ………+bk xk
Simple Linear Regression

46
Forecasting Accuracy
 Forecast error, et = At –Ft

 Measures of forecasting accuracy

 Mean absolute deviation (MAD)

 Mean absolute percentage error (MAPE)

 Mean squared error (MSE)

 Running sum of forecast errors (RSFE)

 Tracking signal = RSFE / MAD

47
MAD, MSE, and MAPE

 Actual  forecast
MAD =
n
2
 ( Actual  forecast)
MSE =
n

(( Actual  forecast ) / Actual)*100


MAPE =
n
48
Tracking Signal
•Tracking signal
–Ratio of cumulative error to MAD

Tracking signal =
(Actual- forecast)
MAD
Bias – Persistent tendency for forecasts to be
Greater or less than actual values.

49
Forecasting Accuracy
2
Period Demand Forecast Error (e) Absolute e Absolute
Error %
Error
1 1600 1523 77 77 5929 4.8%
2 2200 1810 390 390 152100 17.7%
3 2000 2097 -97 97 9409 4.9%
4 1600 2383 -783 783 613089 48.9%
5 2500 2670 -170 170 28900 6.8%
6 3500 2957 543 543 294849 15.5%
7 3300 3243 57 57 3249 1.7%
8 3200 3530 -330 330 108900 10.3%
9 3900 3817 83 83 6889 2.1%
10 4700 4103 597 597 356409 12.7%
11 4300 4390 -90 90 8100 2.1%
12 4400 4677 -277 277 76729 6.3%
Total 0 3494 1664552 1.339001
Average 291.1667 138712.7 11.158%
RSFE MAD MSE MAPE
Software
 Forecasting software
 Forecast Pro and Forecast Pro XE
 SmartForecasts
 SPSS (Statistical Package for Social Science)
 SAS
 EBUSE
 CPFR software
 Manugistics
 i2 Technologies
 Syncra systems

51