Time Series Analysis and Forecasting
Time Series Analysis and Forecasting
Time Series Analysis and Forecasting
and Forecasting
Introduction to Time Series Analysis
• A time series is a set of observations on a quantitative variable collected over
time. Time series data is used to analyze and understand underlying patterns
and behaviors over time, and it can be applied to various fields such as finance,
economics, environmental science, and engineering
• Examples
• Dow Jones Industrial Averages
• Historical data on sales, inventory, customer counts, interest rates, costs,
etc
• Businesses are often very interested in forecasting time series variables.
• In time series analysis, we analyze the past behavior of a variable to predict its
future behavior.
Simple Example
Characteristics of Time Series
1.Trend: The long-term movement or direction in the data over a
period. It can be upward, downward, or neutral.
2.Seasonality: Regular, repeating patterns or cycles in data at fixed
intervals, such as daily, monthly, or annually.
3.Cyclic Patterns: Longer-term oscillations that are not of fixed periods
but still show repeated fluctuations over time.
4.Irregular/Noise: Random variations or fluctuations that do not follow
a pattern and are unpredictable.
Components of Time Series
Analysis
1.Understanding Patterns: Identifying and understanding the various
components of a time series, such as trends, seasonality, and cycles.
2.Modeling: Creating statistical models to represent the time series
data.
3.Forecasting: Using models to predict future values based on historical
data.
4.Decomposition: Breaking down a time series into its constituent
components (trend, seasonality, and residuals) to better understand
and analyze the data.
Applications of Time Series
Analysis
• Forecasting: Predicting future values based on past data, is crucial for
budgeting, financial planning, and resource allocation.
• Anomaly Detection: Identifying outliers or unusual patterns that may
indicate fraud, equipment failure, or other significant events.
• Seasonal Adjustment: Make more accurate comparisons across
different periods.
Cont…
• Understanding the dynamic or time-dependent structure of the
observations of a single series (univariate analysis)
• Forecasting of future observations
• Ascertaining the leading, lagging and feedback relationships among
several series (multivariate analysis)
7
Time Series Components
Descriptive v. Inferential Analysis
• Descriptive Analysis
• Picture of the behavior of the time series
• e.g. Index numbers, exponential smoothing
• No measure of reliability
• Inferential Analysis
• Goal: Forecasting future values
• Measure of reliability
10
Cont…
• Time Frame (How far can we predict?)
• short-term (1 - 2 periods)
• medium-term (5 - 10 periods)
• long-term (12+ periods)
• Trend
• Gradual, long-term movement (up or down) of demand.
• Easiest to detect
Exponential Smoothing
• Exponential smoothing is a way to predict future data points by giving
more importance to recent observations while still considering past
data. It's like looking at recent sales numbers more closely than older
ones to guess what might happen next.
• 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 the “smoothness” of
series
Steps for Calculating an
Exponentially Smoothed Series
Calculate the exponentially smoothed series Et from the
original time series Yt as follows
…
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 Solution
E1 = 45.51
E2 = .2(46.10) + .8(45.51) = 45.63
E3 = .2(44.72) + .8(45.63) = 45.45
…
Jan-05
Feb-05
Mar-05
Apr-05
May-05
Jun-05
Jul-05
Aug-05
Sep-05
Oct-05
Actual Series
Nov-05
Dec-05
(w = .2)
Jan-06
Feb-06
Mar-06
Apr-06
Smoothed Series
May-06
Jun-06
Jul-06
Aug-06
Sep-06
Oct-06
Exponential Smoothing Solution
Nov-06
Dec-06
Inferential Analysis
• Moving Averages
• Regression Analysis
Moving Averages
$15,000
$14,000
Yˆt 7997.533 528.158t
$13,000
$12,000
Tuition
$11,000
$10,000
$9,000
$8,000
1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005
Year
https://trumpexcel.com/moving-average-excel/