Chapter 8
Time series analysis
Learning Objectives
In this chapter you learn:
1. Descriptive Analysis: Index Numbers
2. Introduction to time series
3. Time series components
4. Standard time series models
5. Techniques to isolate time series
components and forecasting
Descriptive Analysis:
Index Numbers
Index Number
Measures change over time relative to a
specific base period
Price Index measures changes in price
e.g. Consumer Price Index (CPI)
Quantity Index measures changes in
quantity
e.g. Number of cell phones produced annually
Simple Index Number
A simple index number is based on the relative
changes (over time) in the price or quantity of a
single commodity.
Steps for Calculating
a Simple Index Number
1. Obtain the prices or quantities for the
commodity over the time period of interest.
2. Select a base period.
3. Calculate the index number for each period
according to the formula
Index number at time t
Time series value at time t
100
Time series value at base period
Steps for Calculating
a Simple Index Number
Symbolically
Yt
I t 100
Y0
where It is the index number at time t, Yt is the
time series value at time t, and Y0 is the time
series value at the base period.
Simple Index Number
Example Year $
1990 1.299
1991 1.098
The table shows the price per 1992 1.087
gallon of regular gasoline in the 1993 1.067
U.S for the years 1990 – 2006. Use 1994 1.075
1995 1.111
1990 as the base year (prior to the 1996 1.224
Gulf War). Calculate the simple 1997 1.199
1998 1.03
index number for 1990, 1998, 1999 1.136
and 2006. 2000 1.484
2001 1.42
2002 1.345
2003 1.561
2004 1.852
2005 2.27
2006 2.572
Simple Index Number Solution
1990 Index Number (base period)
1990price 1.299
100 100 100
1990price 1.299
1998 Index Number
1998price 1.03
100 100 79.3
1990price 1.299
Indicates price had dropped by 20.7% (100 –
79.3) between 1990 and 1998.
Simple Index Number Solution
2006 Index Number
2006price 2.572
100 100 198
1990price 1.299
Indicates price had risen by 98% (100 –
198) between 1990 and 2006.
Simple Index Numbers
1990–2006
Simple Index Numbers
1990–2006
Gasoline Price Simple Index
250.0
200.0
150.0
100.0
50.0
0.0
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
Composite Index Number
Represents combinations of the prices or quantities of
several commodities
Disadvantage: Quantity of each commodity purchased
is not considered
A simple composite index is a simple index for a time
series consisting of the total price or total quantity of
two or more commodities.
Composite Index Number
Example
The table on the next slide shows the monthly
closing stock prices on the last day of the month
for three high-technology stocks listed on the New
York Stock Exchange. Construct the simple
composite index using January 2011 as the
base period.
Simple Composite Index
Solution
Simple Composite Index
Solution
Calculate the total for the three stock prices each month.
These totals are shown in the “TOTAL” column in the Excel
workbook. Then the simple composite index is calculated by
dividing each monthly total by the January 2011 total. The
index values are given in the last column.
Simple Composite Index Solution
The plot of the 2011 simple composite index for these high-
technology stocks shows a dramatic drop in the stock market in
July 2011, followed by an increasing trend. Overall, the
composite price of these high-technology stocks increased
about 11% from January (Index = 100) to December (Index =
111.32).
Weighted Composite Price
Index
A weighted composite price index weights the
prices by quantities purchased prior to calculating
totals for each time period. The weighted totals
are then used to compute the index in the same
way that the unweighted totals are used for
simple composite indexes.
Laspeyres Index
Uses base period quantities as weights
Appropriate when quantities remain approximately
constant over time period
Example: Consumer Price Index (CPI)
Steps for Calculating a
Laspeyres Index
1. Collect price information for each of the k price series
to be used in the composite index. Denote these series
by P1t, P2t, …, Pkt .
2. Select a base period. Call this time period t0.
3. Collect purchase quantity information for the base
period. Denote the k quantities by
Q1t0 , Q2t0 , , Qkt0 .
4. Calculate the weighted totals for each time
period according to the formula
k
Q it0
Pit
i1
Steps for Calculating a
Laspeyres Index
5. Calculate the Laspeyres index, It, at time t by
taking the ratio of the weighted total at time t
to the base period weighted total and
multiplying by k100–that is,
Q it0
Pit
It i1
k
100
Q it0
Pit
0
i1
Laspeyres Index Number
Example
The 2011 January and December prices for the
three high-technology company stocks are given
below. Suppose that, in January 2011, an investor
purchased the quantities shown in the table.
Calculate the Laspeyres index for the investor’s
portfolio of high-technology stocks using January
2011 as the base period.
IBM Intel Micro
Shares Purchased 500 100 1000
January price 162.00 21.46 27.73
December price 183.88 24.25 26.96
Laspeyres Index Solution
January
k
Q
i 1
it0 Pit0 500(162.00) 100(21.46) 1000(27.73)
110,876
December
k
Q
i 1
it0 Pit0 500(183.88) 100(24.45) 1000(26.96)
121,325
Laspeyres Index Solution
k k
Q P
i , Jan i , Jan Q P
i , Jan i , Dec
I Jan i 1
k
100 I Dec i 1
100
k
Q
i 1
P
i , Jan i , Jan Q P
i , Jan i , Jan
i 1
110,876 121,325
100 100
110,876 110,876
100 109.42
The implication is that when weighted by quantities
purchased, the total value of these stocks increased by about
(109% - 100%) = 9% from January to December in 2011.
Paasche Index
Calculated by using price total weighted by the
purchase quantities of the period the index value
represents.
Compare current prices to base period prices at
current purchase levels
Disadvantages
Must know purchase quantities for each time period
Difficult to interpret a change in index when base period
is not used
Steps for Calculating a
Paasche Index
1. Collect price information for each of the k price
series to be used in the composite index.
Denote these series by P1t, P2t, …, Pkt .
2. Select a base period. Call this time period t0.
3. Collect purchase quantity information for the
base period. Denote the k quantities by
Q1t0 , Q2t0 , , Qkt0 .
Steps for Calculating a
Paasche Index
4. Calculate the Paasche index for time t by
multiplying the ratio of the weighted total at
time t to the weighted total at time t0 (base
period) by 100, where the weights used are
the purchase quantities for time period t.
Thus, k
Q P it it
It i1
k
100
Q P it it0
i1
Paasche Index Number
Example
The 2011 January and December prices and
volumes (actual quantities purchased) in millions
of shares for three high-technology company
stocks are shown in Table 14.4. Calculate and
interpret the Paasche index, using January 2011
as the base period.
IBM Intel Micro
Price Volume Price Volume Price Volume
Jan. 162.00 7 21.46 91 27.73 65
Dec. 183.88 12 24.25 92 26.96 101
Paasche Index Solution
Q P
i , Jan i , Jan
I Jan i 1
k
100 100
Q
i 1
P
i , Jan i , Jan
k
Paasche Index Solution
Q P
iDec iDec
I Dec i 1
k
100
Q
i 1
P
iDec iJan
12(183.88) 92(24.25) 101(26.96)
100
12(162.00) 92(21.46) 101(27.73)
7160.52
100 106.6
6719.05
The implication is that in 2011, December prices represent
a (106.6% - 100%), = 6.6% increase from January prices,
assuming the purchase quantities were at December levels
for both periods.
Time Series
What is a time series?
a collection of data recorded over a period of time
(weekly, monthly, quarterly)
an analysis of history, it can be used by management
to make current decisions and plans based on long-
term forecasting
Usually assumes past pattern to continue into the
future
Example
Governments want to know future values of
interest rates, unemployment rates, and
percentage increases in the cost of living.
Housing industry economists must forecast
mortgage interest rates, demand for housing,
and the cost of building materials.
Many companies attempt to predict the demand
for their products and their share of the market.
Forecasting
Forecasting is a common practice among
managers and government decision makers. This
chapter focuses on time-series forecasting, which
uses historical time series data to predict future
values of variables such as sales or
unemployment rates.
Forecasting can be based on developing a model
that attempts to analyze the relationship between
a dependent variable and one or more
independent variables.
Components of a Time Series
Secular Trend – the smooth long term direction of a
time series
Cyclical Variation – the rise and fall of a time series over
periods longer than one year
Seasonal Variation – Patterns of change in a time
series within a year which tends to repeat each year
Irregular Variation – classified into:
Episodic – unpredictable but identifiable
Residual – also called chance fluctuation and unidentifiable
Cyclical Variation – Sample
Chart
Seasonal Variation – Sample
Chart
Secular Trend – Home Depot Example
Secular Trend – EMS Calls Example
Secular Trend – Manufactured Home
Shipments in the U.S.
Standard time series models
Moving Averages
Centered Moving Averages
Exponential Smoothing
The Moving Average Method
A moving average for a time period is the
arithmetic mean of the values in that time period
and those close to it.
Useful in smoothing time series to see its trend
Basic method used in measuring seasonal
fluctuation
Applicable when time series follows fairly linear
trend that have definite rhythmic pattern
Example
Example
Example
Example
Example
Centered Moving Averages
Using an even number of periods to calculate the moving
averages presents a problem about where to place the
moving averages in a graph or table. Centering the
moving average corrects the problem.
Exponential Smoothing
Type of weighted average
Removes rapid fluctuations in time series (less
sensitive to short–term changes in prices)
Allows overall trend to be identified
Used for forecasting future values
Exponential smoothing constant (w) affects
“smoothness” of series
Exponential Smoothing
Constant
Exponential smoothing constant, 0 < w < 1
w close to 0
More weight given to previous values of time series
Smoother series
w close to 1
More weight given to current value of time series
Series looks similar to original (more variable)
Steps for Calculating an
Exponentially Smoothed Series
1. Select an exponential smoothing constant, w,
between 0 and 1. Remember that small values
of w give less weight to the current value of the
series and yield a smoother series. Larger
choices of w assign more weight to the current
value of the series and yield a more variable
series.
Steps for Calculating an
Exponentially Smoothed Series
2. Calculate the exponentially smoothed series Et
from the original time series Yt as follows:
E1 = Y1
E2 = wY2 + (1 – w)E1
E3 = wY3 + (1 – w)E2
…
Et = wYt + (1 – w)Et–1
Exponential Smoothing
Example
The closing stock prices on the last
day of the month for Daimler–
Chrysler in 2005 and 2006 are given
in the table. Create an exponentially
smoothed series using w = .2.
Exponential Smoothing
Thinking Challenge
The closing stock prices on the last
day of the month for Daimler–
Chrysler in 2005 and 2006 are given
in the table. Create an exponentially
smoothed series using w = .8.
Forecasting
Exponentially Smoothed Forecasts
Holt’s Method
Measuring Forecast Accuracy: MAD and
RMSE
Forecasting Trends: Simple Linear
Regression
Exponentially Smoothed
Forecasts
Assumes the trend and seasonal component
are relatively insignificant
Exponentially smoothed forecast is constant for
all future values
Ft+1 = Et
Ft+2 = Ft+1
Ft+3 = Ft+1
Use for short–term forecasting only
Calculation of Exponentially
Smoothed Forecasts
1. Given the observed time series Y1, Y2, … , Yt,
first calculate the exponentially smoothed values
E1, E2, … , Et, using
E1 = Y1
E2 = wY2 + (1 – w)E1
Et = wYt + (1 – w)Et –1
Calculation of Exponentially
Smoothed Forecasts
2. Use the last smoothed value to forecast the next
time series value:
Ft +1 = Et
3. Assuming that Yt is relatively free of trend and
seasonal components, use the same forecast
for all future values of Yt:
Ft+2 = Ft+1
Ft+3 = Ft+1
Exponential Smoothing
Forecasting Example
The closing stock prices on the
last day of the month for
Daimler–Chrysler in 2005 and
2006 are given in the table along
with the exponentially smoothed
values using w = .2. Forecast
the closing price for the January
31, 2007.
Forecasting Trends:
Holt’s Method
The Holt Forecasting Model
Accounts for trends in time series
Two components
Exponentially smoothed component, Et
Smoothing constant 0 < w < 1
Trend component, Tt
Smoothing constant 0 < v < 1
Close to 0: More weight to past trend
Close to 1: More weight to recent trend
Steps for Calculating
Components of the Holt
Forecasting Model
1. Select an exponential smoothing constant w
between 0 and 1. Small values of w give less
weight to the current values of the time series
and more weight to the past. Larger choices
assign more weight to the current value of the
series.
Steps for Calculating
Components of the Holt
Forecasting Model
2. Select a trend smoothing constant v between 0
and 1. Small values of v give less weight to the
current changes in the level of the series and
more weight to the past trend. Larger values
assign more weight to the most recent trend of
the series and less to past trends.
Steps for Calculating
Components of the Holt
Forecasting Model
3. Calculate the two components, Et and Tt, from
the time series Yt beginning at time t = 2 :
E2 = Y2 and T2 = Y2 – Y1
E3 = wY3 + (1 – w)(E2 + T2)
T3 = v(E3 – E2) + (1 – v)T2
…
Et = wYt + (1 – w)(Et–1 + Tt–1)
Tt = v(Et – Et–1) + (1 – v)Tt–1
Holt Example
The closing stock prices on the
last day of the month for
Daimler–Chrysler in 2005 and
2006 are given in the table.
Calculate the Holt–Winters
components using w = .8 and
v = .7.
Holt’s Forecasting Methodology
1. Calculate the exponentially smoothed and trend
components, Et and Tt, for each observed value
of Yt (t ≥ 2) using the formulas given in the
previous box.
2. Calculate the one-step-ahead forecast using
Ft+1 = Et + Tt
3. Calculate the k-step-ahead forecast using
Ft+k = Et + kTt
Holt Forecasting Example
Use the Holt series to
forecast the closing price of
Daimler–Chrysler stock on
1/31/2007 and 2/28/2007.
Holt Thinking Challenge
The data shows the
average undergraduate
tuition at all 4–year
institutions for the years
1996–2004 (Source: U.S.
Dept. of Education).
Calculate the Holt–Winters
components using w = .7
and v = .5.
Holt Forecasting Thinking
Challenge
Use the Holt–Winters series to forecast tuition in
2005 and 2006
Measuring Forecast Accuracy:
MAD and RMSE
Mean Absolute Deviation (MAD)
Mean absolute difference between the forecast
and actual values of the time series
Sum of squares of Forecast
Error (SSE)
SSE is the sum of the squared differences.
Forecasting Trends:
Simple Linear Regression
Simple Linear Regression
Model: E(Yt) = β0 + β1t
Relates time series, Yt, to time, t
Cautions
Risky to extrapolate (forecast beyond observed data)
Does not account for cyclical effects
Simple Linear Regression
Example
The data shows the average
undergraduate tuition at all
4–year institutions for the
years 1996–2004 (Source:
U.S. Dept. of Education).
Use least–squares
regression to fit a linear
model. Forecast the tuition
for 2005 (t = 11) and
compute a 95% prediction
interval for the forecast.
Simple Linear Regression
Solution
From Excel
Yˆt 7997.533 528.158t
Seasonal Regression Models
Takes into account secular trend and seasonal
effects (seasonal component)
Uses multiple regression models
Dummy variables to model seasonal
component
E(Yt) = β0 + β1t + β2Q1 + β3Q2 + β4Q3
End of Chapter 8