Professional Documents
Culture Documents
w02 l1 Timeseries Clean
w02 l1 Timeseries Clean
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 2
Demand – Sales by Week
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 3
Demand – Sales by Day
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 4
Demand - Seasonality Sales also differ dramatically
by day of week (DOW)!
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 5
Demand Forecast
Now
Past Future
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 6
Agenda
• Time Series Components
• Cumulative Forecasts
• Naïve Forecasts
• Moving Average Forecasts
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 7
Time Series Components
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 8
Time Series Components
• Level (a)
Demand rate
n Value where demand hovers around (mean) a
n Captures scale of the time series
n With no other pattern present its a constant value
time
• Trend (b)
n Rate of growth or decline
Demand rate
n Persistent movement in one direction
n Typically linear but can be exponential, quadratic, etc.
b
Demand rate
n
• Random Fluctuations (e or ε)
n Remainder of variability after other components time
n Irregular and unpredictable variations, noise
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 9
Time Series Components
• Cyclical Movements (C)
n Periodic movement not of a fixed period
n Duration can be of different lengths
n Most often tied to longer term business cycles or economic conditions
80
70
60
50
40
70 30
Institute of Supply Management (ISM)
20
65
Purchasing Manager Index ( PMI)
49
54
59
64
68
73
78
83
88
93
98
03
08
13
Expansion
19
19
19
19
19
19
19
19
19
19
19
20
20
20
60
55
50
Contracting
45
40
35
30
Oct-06 Apr-07 Oct-07 Apr-08 Oct-08 Apr-09 Oct-09 Apr-10 Oct-10
Data source: Federal Reserve of St. Louis.
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 10
http://research.stlouisfed.org/fred2/series/NAPM
Time Series Models
• Components can be combined in different ways:
Note – we can transform the multiplicative
n Multiplicative: xt = bFtCtet xt = bFtCtet to: ln(xt)=ln(b)+ln(Ft)+ln(Ct)+ln(et)
n Additive: xt = a + bt + Ft + Ct + et
n Mixed: xt = (a + bt)Ft + Ct + et Model depends on how
xt = a + btFt + Ct + et seasonality impacts
xt = aFt + bt + Ct + et trend and/or level?
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 12
Time Series Models
• Predominant use of Time Series is for forecasting product demand of . . .
Mature products at the SKU level over a . . .
Short time horizon (weeks, months, quarters, year) . . .
Where demand of items is independent.
• So, components used are level, trend, seasonality, and error.
• Simple Procedure
1. Select an appropriate underlying model of the demand pattern over time
2. Estimate and calibrate values for the model parameters
3. Forecast future demand with the models and parameters selected
4. Review model performance and adjust parameters and model accordingly
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 13
Time Series Analysis
• Critical assumption: How important is the history?
• Two extreme assumptions: Very Important or Not at All
Cumulative Forecast Naïve Forecast
n All history matters equally n Most recent dictates next
n Pure stationary demand n Random Walk, Last is Next
where: where:
et ~ iid (μ=0 , σ2=V[e]) e t ~ iid (μ=0 , σ2=V[e])
Forecasting Model: Forecasting Model:
t
∑ x x̂t ,t+1 = xt
i=1 i
x̂t ,t+1 =
t
x̂t ,t+τ = Forecast made at end of period t for demand in period t+τ , for τ =1,2,3 ...
xt = Actual demand for period t
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 14
Cumulative vs. Naïve Forecasts
Suppose we are at time=10 and want to find forecast for time=11; x^10,11
110
t xt
1 109
108 Cumulative Forecast:
106 10
2 92 x
3 98
104
x̂10,11 =
∑ i=1 i
=
995
= 99.5
102 10 10
4 96
100
5 104
98
6 98
96
7 109
94 Naïve Forecast:
8 99
9 94 92 x̂10,11 = x10 = 96
90
10 96
1 2 3 4 5 6 7 8 9 10 11
Lets look at “next period” forecasts for cumulative and naïve models . . .
Cumul Naïve 110
108
t xt x^t,t+1 x^t,t+1 Note:
106
1 109 109 109
104 • Cumulative model is
2 92 100.5 92
3 98 99.7 98 102 “calm” while the
4 96 98.8 96 100 Naïve model is
5 104 99.8 104 98 “nervous”.
6 98 99.5 98 96 • Naïve model is more
7 109 100.9 109 94 responsive than the
8 99 100.6 99 92 cumulative model.
9 94 99.9 94 90
1 2 3 4 5 6 7 8 9 10 11
10 96 99.5 96
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 15
Moving Average Forecast
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 16
Underlying Model:
Time Series Models xt = a + et
• Moving Average where:
n Only include the last M observations
n Compromise between cumulative et ~ iid (μ=0 , σ2=V[e])
and naïve Forecasting Model:
t
∑ xi
x̂t ,t+1 = i=t+1−M
M
x̂t ,t+1 110
108
106
t xt Naïve M2 M4 M6 Cum 104
1 109 109 109.0
2 92 92 100.5 100.5 102
3 98 98 95.0 99.7 100
4 96 96 97.0 98.8 98.8
98
5 104 104 100.0 97.5 99.8
6 98 98 101.0 99.0 99.5 99.5 96
7 109 109 103.5 101.8 99.5 100.9 94
8 99 99 104.0 102.5 100.7 100.6
92
9 94 94 96.5 100.0 100.0 99.9
10 96 96 95.0 99.5 100.0 99.5 90
1 2 3 4 5 6 7 8 9 10 11
Actual Naïve M2 M4 M6
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 17
Moving Average Models
t
∑ xi
x̂t ,t+1 = i=t+1−M
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 18
Key Points from Lesson
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 19
Key Points from Lessons
• Time Series Analysis
Demand rate
n Pattern matching of data that is
distributed over time time
Demand rate
n Level (a) a
n Trend (b)
n Seasonality (F) time
Demand rate
n Error (e)
n Cyclical (C) b
n Level Model: xt = a + et F
Demand rate
n Trend Model: xt = a + bt + et
n Seasonality Model: xt = (a + bt)Ft + et
time
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 20
t
∑ x
Key Points from Lessons x̂t ,t+1 = i=1 i
t
• Three Models
x̂t ,t+1 = xt
n Cumulative – “everything matters”
n Naïve – “only yesterday matters” t
n Moving Average – “select how much matters” ∑ xi
x̂t ,t+1 = i=t+1−M
• Differences M
n Level of volatility
w Naïve (nervous) to Cumulative (calm) with MA in middle
n Required amount of data to store
w Naïve & Cumulative (1 per SKU)
w Moving Average (M items for each SKU)
• Similarities
n Assume level demand – no trends or steps or seasonality
n All of these models lag to some degree
n Equal weighting of observations regardless of time
CTL.SC1x - Supply Chain and Logistics Fundamentals Lesson: Time Series Analysis 21
CTL.SC1x -Supply Chain & Logistics Fundamentals
“Dude”
Photo courtesy Yankee Golden
Retriever Rescue (www.ygrr.org)
MIT Center for
Transportation & Logistics caplice@mit.edu