0% found this document useful (0 votes)
10 views

Class 2024 Friday

Uploaded by

thembashomang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Class 2024 Friday

Uploaded by

thembashomang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

LEBOGO RJ

WHAT IS TIME SERIES


• A time series may be defined as a set of
observations of a random variable
arranged in chronological (time) order. We
also say it’s a series of observations
recorded sequentially at equally spaced
intervals of time.

LEBOGO RJ
Why do we need time series?
• Every organization has a need to forecast the
demand for the goods or services it provides.
For many organizations, the ability to forecast
plays a major role in determining the general
success of the organization.
• Forecasters they need tools to assist in
preparing the forecast. This chapter provides
an introduction to several basic forecasting
techniques and illustrates how and when to
apply them.

LEBOGO RJ
Time Series Data
• The concepts of forecasting and planning are often confused.
Planning is the process of determining how to deal with the
future. On the other hand, forecasting is the process of
predicting what the future will be like. Forecasts are used as
inputs for the planning process.
• The two broad categories of forecasting techniques are
qualitative and quantitative. Qualitative forecasting
techniques are based on expert opinion and judgment.
Quantitative forecasting techniques are based on statistical
methods for analyzing quantitative historical data. This
chapter focuses on quantitative forecasting techniques.

LEBOGO RJ
Time Series Data
• All quantitative forecasting models use
past measurements of the variable of
interest to generate a forecast of the
future. The past data, measured over time,
are called time-series data. The decision
maker who plans to develop a quantitative
forecasting model must analyze the
relevant time-series data

LEBOGO RJ
General Forecasting Issues
• Model Specification ( Identification) - The
process of selecting the forecasting
technique to be used in a particular situation.
• Model Building (Fitting)- The process of
estimating the specified model’s parameters
to achieve an adequate fit of the historical
data.
• Model Diagnosis - The process of
determining how well a model fits past data
and how well the model’s assumptions
appear to be satisfied.

LEBOGO RJ
Forecasting Horizon
Forecasting Horizon-The number of future periods covered by a forecast. It is
sometimes referred to as forecast lead time.
Four categories:

1. Immediate term—less than one month


2. Short term—one to three months
3. Medium term—three months to two years
4. Long term—two years or more

Forecasting Period-The unit of time for which forecasts are to be made.


The forecasting horizon consists of 1 or more forecasting periods.
Forecasting Interval-The frequency with which new forecasts are prepared.
The forecasting interval is generally the same length as the forecast period.
General Approach to Time Series
Modeling
• Plot the series and examine the main
features: This is usually done with the aid of
some computer package e.g. SPSS, SAS,
etc.
• Reform a transformation of the data if
necessary.
• Remove the components to get stationary
residuals by differencing the data.(i.e
Replacing the original series 𝑥𝑡 , by ∇𝑥𝑡 =
𝑥𝑡 − 𝑥𝑡−1 choose a model to fit the residuals.
• Do the forecasting
LEBOGO RJ
Time Series plots
• The most important step in time series
analysis is to plot the observations against
time. This graph should show up important
features of the series such as a trend,
seasonality, outliers and discontinuities.

• EXAMPLE: monthly sales of cars in South


Africa in company A

LEBOGO RJ
Time series plot (SPSS)
LEBOGO RJ

Sales_quantity
40000

35000

30000

25000

20000

15000

10000

5000

YEARS

Sales_quantity
Component of a time series
• A trend is the long-term increase or decrease in a
variable being measured over time (linear or
nonlinear).
• A seasonal component is a wavelike pattern that is
repeated throughout a time series and has a
recurrence period of at most one year.
• A cyclical component is a wavelike pattern within the
time series that repeats itself throughout the time
series and has a recurrence period of more than one
year.
• A random component: changes in time-series data
that are unpredictable and cannot be associated with a
trend, seasonal, or cyclical component.

LEBOGO RJ
Sales_quantity
LEBOGO RJ

40000

35000

Trend (T) 30000

25000
• A smooth or regular underlying
movement of a series over a 20000

fairly long period of time. A


gradual and consistent pattern of 15000

changes.
10000

5000

Jan-18

Jan-19

Jan-20

Jan-21

Jan-22

Jan-23
Sep-18

Sep-19

Sep-20

Sep-21

Sep-22
May-18

May-19

May-20

May-21

May-22
YEARS

Sales_quantity
Seasonal variation (S)
• Movement in a time series which recur
year after in some months or quarters with
more less the same intensity.
Sales_quantity
40000
35000
30000
25000
20000
15000
10000
5000
0

YEARS

Sales_quantity

LEBOGO RJ
Cyclical variation (C)
• Period variations extending over a long
period of time.

LEBOGO RJ
Sales_quantity
Irregular 40000

variation (I) 35000

30000

25000

20000
• Variations caused by readily
identifiable special events 15000
such as elections, wars,
floods, earthquakes, 10000
strikes,virus etc.
5000

Jul-18

Jul-19

Jul-20

Jul-21

Jul-22
Jan-18

Jan-19

Jan-20

Jan-21

Jan-22

Jan-23
Oct-18

Oct-19

Oct-20

Oct-21

Oct-22
Apr-18

Apr-19

Apr-20

Apr-21

Apr-22

Apr-23
YEARS

Sales_quantity

LEBOGO RJ
Homework

Additive and multiplicative model


the difference between it?

LEBOGO RJ
Methods for trend isolation

(a) The moving average method: Produces


a smooth curve.
(b) Regression analysis method: Involves
fitting a straight line.

LEBOGO RJ
Seasonal Analysis
• Seasonal analysis isolates the influence of
seasonal forces on a time series. The
ratio-to-moving average method is used to
measure these influences. The seasonal
influence is expressed as an index
number.

LEBOGO RJ
Smoothing methods
Smoothing methods are used to get rid of the
random or irregular component of a time
series.
• Moving averages:
A moving average (ma) of order M is
produced by calculating the average value of
a variable over a set of M values of the
series.
• Running median:
A running median of order M is produced by
calculating the median value of a variable
over a set of M values of the series.

LEBOGO RJ
Moving averages:

• A moving average is a technical indicator that


investors and traders use to determine the trend
direction of securities.
• What are the 4 major moving averages?
The 5-, 10-, 20- and 50-day moving averages are
often used to spot near-term trend changes.
• Moving averages serve to "smooth" chronological
data; they reduce the impact of sharp peaks and
dips because every raw data point is provided with
a fractional weight in the moving average.

LEBOGO RJ
The ratio-to-moving average
method
• Step-1
Identify the trend/cyclical movement.
The moving average approach is used to
isolate the trend/cyclical movement in a time
series.

LEBOGO RJ
Step 2
• Find seasonal ratio using the formula:
𝑎𝑐𝑡𝑢𝑎𝑙 𝑋𝑡
• 𝑠𝑒𝑎𝑠𝑜𝑛𝑎𝑙 𝑟𝑎𝑡io = × 100
𝑚𝑜𝑣𝑖𝑛𝑔 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑠𝑒𝑟𝑖𝑒𝑠

LEBOGO RJ
Step 3
• Average the seasonal ratios across
corresponding periods within each year.
The averaging of seasonal ratios has the
effect of smoothing out irregular
component inherent in the seasonal ratios.
• Generally, the median is used to find the
average of seasonal ratios for correspond
periods.

LEBOGO RJ
Step 4
• Compute adjusted seasonal indices. The
adjusted factor is determined as follows:

𝐴𝑑𝑗𝑢𝑠𝑡𝑒𝑑 𝑠𝑒𝑎𝑠𝑜𝑛𝑎𝑙 𝑖𝑛𝑑𝑖𝑐𝑒𝑠 = 𝐴𝑑𝑗𝑢𝑠𝑡𝑒𝑑 𝑓𝑎𝑐𝑡𝑜𝑟 × 𝑚𝑒𝑑𝑖𝑎𝑛 𝑠𝑒𝑎𝑠𝑜𝑛𝑎𝑙 𝑖𝑛𝑑𝑖𝑐𝑒𝑠

LEBOGO RJ
De-seasonalising the actual time
series
• Seasonal influences may be removed from
a time series by dividing the actual y value
for each period by its corresponding
seasonal index.
𝑎𝑐𝑡𝑢𝑎𝑙 𝑋𝑡
• 𝐷𝑒𝑠𝑒𝑎𝑠𝑜𝑛𝑎𝑙𝑖𝑠𝑒𝑑 𝑋𝑡 = × 100
𝑆𝑒𝑎𝑠𝑜𝑛𝑎𝑙 𝑖𝑛𝑑𝑒𝑥

LEBOGO RJ
Example/homework
• Consider the following quarterly demand levels for electricity (in 1000
megawatts) in Limpopo from 2013 to 2016.

Quarters 2013 2014 2015 2016


Jan-Mar 21 35 49 78
Apr-Jun 43 45 84 114
Jul-Sep 60 49 136 69
Oct-Dec 12 18 91 106
• (a) Find the three- point moving averages to obtain the trend of the data.
• (b) Find the five-point moving averages for the data.
• (c) Draw both three and five-point moving average on the same axis.

LEBOGO RJ
LEBOGO RJ
Example

LEBOGO RJ
Seasonal ratio

LEBOGO RJ
LEBOGO RJ
Seasonal indices

LEBOGO RJ

You might also like