You are on page 1of 76

DR.P.N.

HARIKUMAR
PROFESSOR
SCHOOL OF BUSINESS MANAGEMENT& LEGAL STUDIES
DEPARTMENT OF COMMERCE
UNIVERSITY OF KERALA
THIRUVANANTHAPURAM
STRUCTURE
Meaning

Example

Types of datasets

Types of Time series analysis

Aims of Time series analysis

Time series graphs

Components of Time series

Stationarity
WHAT IS A TIME SERIES?
• Essentially, Time Series is a sequence of numerical data obtained at
regular time intervals.
• “A set of data depending on the time is called Time Series”
• “A time series consists of data arranged chronologically”
• Time series forecasting uses information regarding historical values and
associated patterns to predict future activity.

Occurs in many areas: economics, finance, environment, medicine


EXAMPLES OF TIME SERIES DATA

• Number of babies born in each hour


• Daily closing price of a stock.
• GDP of the country, measured each year.
TYPES OF DATA SETS

CROSS SECTIONAL
TIME SERIES DATA DATA PANEL DATA
DIFFERENCES BETWEEN THE THREE DATA TYPES
A time series is a group of observations on a single entity over time — e.g.
the daily closing prices over one year for a single financial security, or a
single patient’s heart rate measured every minute over a one-hour procedure.

A cross-section is a group of observations of multiple entities at a single


time — e.g. today’s closing prices for each of the S&P 500 companies, or
the heart rates of 100 patients at the beginning of the same procedure.

If your data is organized in both dimensions — e.g. daily closing prices over
one year for 500 companies — then you have panel data.
• Types of Time Series that a dataset can belong to:

A Univariate Time Series refers to the


set of observations over time of a
single variable. One important thing to A Multivariate Time Series refers to
note here is that this type always has the set of observations over time of
the time as an implicit variable. And, several variables and not one. In this
if the data points are equally spaced, type, each variable is dependent not
then the time variable need not be only on one type of equispaced data
explicitly given. This type helps you but also on other variables apart from
decide as to how the dependent it.
variable (price values) differs with
regard to time, which is the
independent variable.
• The aims of time series analysis are
• to describe and summarize time series data,
• fit models, and make forecasts
• Why are time series data different from other data?
• Data are not independent
• Much of the statistical theory relies on the data being independent and identically
distributed
• Large samples sizes are good, but long time series are not always the best
• Series often change with time, so bigger isn’t always better

Time series analysis can be useful to see how a given variable changes over time
(while time itself, in time series data, is often the independent variable). Time
series analysis can also be used to examine how the changes associated with the
chosen data point compare to shifts in other variables over the same time period.
WHAT ARE USERS LOOKING FOR IN AN ECONOMIC
TIME SERIES?

• Important features of economic indicator series include


• Direction
• Turning points
• In addition, we want to see if the series is
increasing/decreasing more slowly/faster than it was
before
WHEN SHOULD TIME SERIES ANALYSIS BEST BE
USED?
• We do not assume the existence of deterministic model governing the behaviour of the
system considered.

• Instances where deterministic factors are not readily available and the accuracy of the
estimate can be compromised on the need..(be careful!)

• We will only consider univariate time series


FORECASTING HORIZONS
• Long Term
• 5+ years into the future
• R&D, plant location, product planning
• Principally judgement-based
• Medium Term
• 1 season to 2 years
• Aggregate planning, capacity planning, sales forecasts
• Mixture of quantitative methods and judgement
• Short Term
• 1 day to 1 year, less than 1 season
• Demand forecasting, staffing levels, purchasing, inventory levels
• Quantitative methods
TIME SERIES EXAMPLE

• How the data (x) and time (t) is recorded and presented

Exports, 1989-1998
t Year x=Value
1 1989 44,320
2 1990 52,865
3 1991 53,092
4 1992 39,424
5 1993 34,444
6 1994 47,870
7 1995 49,805
8 1996 59,404
9 1997 70,214
10 1998 74,626
TIME SERIES
• Coordinates (t,x) is established in the 2 axis
• (1, 44,320) Exports
• (2, 52,865)
80,000
• (3, 53,092) 75,000
70,000
• etc.. 65,000
60,000
55,000
50,000
45,000
40,000
35,000
30,000
1988 1990 1992 1994 1996 1998 2000
TIME SERIES
• A graphical representation of time series.
• We use x as a function of t: x= f(t)
• Data points connected by a curve Exports

80,000
75,000
70,000
65,000
60,000
55,000
50,000
45,000
40,000
35,000
30,000
1988 1990 1992 1994 1996 1998 2000
SEE THE PLOT BELOW. IT IS DRAWN FROM A DATA OF
MONTHLY BOOKINGS FOR AN AIRLINE. THIS DATA IS
A TIME SERIES. 
IMPORTANCE OF TIME SERIES ANALYSIS

• Understand the past.


What happened over the last years, months?
• Forecast the future.
Government wants to know future of unemployment rate,
percentage increase in cost of living etc.
For companies to predict the demand for their product etc.
LINEAR VS. NONLINEAR TIME SERIES DATA

A linear time series is one where, for Nonlinear time series are generated by
nonlinear dynamic equations. They have features that
each data point Xt, that data point can be viewed as
cannot be modelled by linear processes: time-
a linear combination of past or future values or changing variance, asymmetric cycles, higher-
differences. moment structures, thresholds and breaks.
HOW IS TIME SERIES DATA UNDERSTOOD AND USED?

In data mining, pattern recognition and machine learning, time series analysis
is used for clustering, classification, and forecasting.

In signal processing, control engineering and communication engineering,


time series data is used for signal detection and estimation.

In statistics, econometrics, quantitative finance, the time series analysis is


used for forecasting.
UTILITY OF TIME SERIES

• To Study the Past Behaviour of Data


• To Forecast the Future Behaviour
• Estimation of Trade Cycles
• Comparison with other Time Series
COMPONENTS OF TIME SERIES
• A time series has the following four important components:
 Secular Trend/Trend -T
 Seasonal Variations –S
 Oscillation-O
 Random component. R
4 COMPONENTS OF TIME SERIES

Cyclica
Trend Seasonal Random
l

A study of time series aims at identifying the possible contributions of these effects and
after eliminating these effects the remaining series called as the ‘Residual Series’ is taken
up for high end solutions using different type of models. However, the identification of
effects due to Trend and Seasonal Variation are highly valuable in Econometric studies.
TIME SERIES
• A time series is said to be an effect of these four components and the researcher may
choose from the two alternative models i.e. additive or multiplicative models.
• In an additive model these forces or components are added up to give time series. This
means that at every point of time these four forces may be in operation and hence there
may be an effect due to Trend (T), an effect due to Seasonal Variation (S), Oscillation (O)
and Random component (R) and the value of the observation of the variable at that point
of time is taken as the sum of these four effects. If the variable is taken as y and its
observation at time‘t’ is denoted by then it is assumed to be given by .

• Yt= Tt+St+Ot+Rt
• Similarly the alternative model will be obtained by multiplying these effects to get .

• Yt= Tt*St*Ot*Rt
• Trend (Tt )

Trend: the long-term patterns or movements in the data.


Overall or persistent, long-term upward or downward pattern
of movement.
The trend of a time series is not always linear.
SEASONAL VARIATION

Regular periodic fluctuations that occur within year.


Examples:
Consumption of heating oil, which is high in winter,
and low in other seasons of year.
Gasoline consumption, which is high in summer when
most people go on vacation.
CYCLICAL COMPONENT

Long-term wave-like patterns


Regularly occur but may vary in length
Often measured peak to peak or trough to trough
RANDOM COMPONENT

Unpredictable, random, Possible causes of


Random Component
“residual” fluctuations
Unseasonable
Due to random variations of weather/natural
Nature disasters
Accidents or unusual events Strikes
“Noise” in the time series Sampling error
Nonsampling error
SECULAR TREND
SEASONAL VARIATION (ST )

30
25
20
15
10
5
0
-5
-10
CYCLIC VARIATION
RANDOM VARIATION
CLASSICAL DECOMPOSITION
• One method of describing a time series
• Decompose the series into various components
• Trend – long term movements in the level of the series
• Seasonal effects – cyclical fluctuations reasonably stable in terms of annual timing (including moving
holidays and working day effects)
• Cycles – cyclical fluctuations longer than a year
• Irregular – other random or short-term unpredictable fluctuations
Contributed by National Academy of Statistical Administration

32

Not easy to understand the pattern!


OUR AIM
• is to understand and identify different variations so that we can easily predict the future variations
separately and combine together
• Look how the above complicated series could be understood as follows separately
Contributed by National Academy of Statistical Administration

34
Contributed by National Academy of Statistical Administration

35
Contributed by National Academy of Statistical Administration

36
Contributed by National Academy of Statistical Administration

37
Contributed by National Academy of Statistical Administration

38 FEW VARIATIONS SEPARATELY


Contributed by National Academy of Statistical Administration

39 SMOOTHING TECHNIQUES

• Smoothing helps to see overall patterns in time series data.


• Smoothing techniques smooth or “iron” out variation to get the overall picture.
• There are several smoothing techniques of time series.
Contributed by National Academy of Statistical Administration

40 SMOOTHING TECHNIQUES

• We will study :
• Moving average.
• Exponential smoothing
SMOOTHING THE
Contributed by National Academy of Statistical Administration

41 ANNUAL TIME SERIES

• Calculate moving averages to get an overall impression of the pattern of movement over time
Moving Average: averages of consecutive
time series values for a
chosen period of length L
Contributed by National Academy of Statistical Administration

42 MOVING AVERAGES

• Used for smoothing


• A series of arithmetic means over time
• Result dependent upon choice of L (length of period for computing means)
• Examples:

• For a 3 year moving average, L = 3


• For a 5 year moving average, L = 5
• Etc.
Contributed by National Academy of Statistical Administration

43 SMOOTHING TECHNIQUES:
MOVING AVERAGE (MA)
• Odd number of points. Points (k) – length for computing MA
• k=3

y1  y2  y3
MA1 
3
y 2  y3  y 4
MA2 
and so on. 3
MOVING AVERAGE METHOD

 Odd Period Moving Average


 Even Period Moving Average
Fit a Trend line using Three year Moving Average Method

Year 1981 1982 1983 1984 1985 1986 1987

Production 412 438 446 454 470 483 490


YEAR PRODUCTION THREE YEARLY THREE YEARLY
MOVING TOTALS MOVING
AVERAGE (Trend
Values)
1981 412

1982 438 412+438+446=1296 1296/3=432

1983 446 438+446+454=1338 1338/3=446

1984 454 446+454+470=1370 1370/3=457

1985 470 454+470+483=1407 1407/3=469

1986 483 470+483+490=1443 1443/3=481

1987 490
Year 1981 1982 1983 1984 1985 1986 1987
Production 412 438 446 454 470 483 490
Moving 432 446 457 469 481
Averages
FIT A TREND LINE USING 4 YEARS MOVING
AVERAGE METHOD

YEAR 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979

SALES 7 8 9 11 10 12 8 6 5 10
(IN
CRORE)
Year 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979
Sales (in 7 8 9 11 10 12 8 6 5 10
crore)
Moving 9.125 10 10.375 9.625 8.375 7.5
average
LEAST SQUARE METHOD

• Fitting of Straight Line Trend


A straight line trend can be expressed by the following equation:
Y=a+bX
where, Y= trend values, X= unit of time, a is the Y-intercept and b
is the slope of line
STATIONARITY

WHAT IS STATIONARITY
•A stationary time series is a series where there are no changes in the
underlying system
•Constant mean (no trend)
•Constant variance (No hetroscedastisity )
•Constant autocorrelation structure)
•No periodic component (No seasonality)

A stationary model is when there is consistency in data over a period.


• Why is Stationarity Important?
• Most forecasting methods assume that a distribution has stationarity. For example, autocovariance and
autocorrelations rely on the assumption of stationarity. An absence of stationarity can cause unexpected or
• bizarre behaviors, like t-ratios not following a t-distribution or high R-squared values assigned to variables
that aren’t correlated at all.
• A stationary process has the property that the mean, variance and autocorrelation structure do not change
over time. Stationarity can be defined in precise mathematical terms, but for our purpose we mean a flat
looking series, without trend, constant variance over time, a constant autocorrelation structure over time and
no periodic fluctuations (seasonality).

If the series is consistently increasing over time, the sample mean


and variance will grow with the size of the sample, and they will
always underestimate the mean and variance in future periods.
• Defining a Stationary Time Series, it is the one where the mean and
the variance are both constant over time. In other words, it is the one
whose properties do not depend on the time at which the series is
observed. Thus, the Time Series is a flat series without trend, with
constant variance over time, a constant mean, a constant
autocorrelation and no seasonality. This makes a Stationary Time
Series easy to predict.
CONSTANT MEAN
CONSTANT VARIANCE
AUTO CORRELATION
TRANSFORMATIONS TO ACHIEVE STATIONARITY
• If the time series is not stationary, we can often transform it to stationarity with one of the following
techniques. We can difference the data. That is, given the series Zt, we create the new series Yi=Zi−Zi−1.
• The differenced data will contain one less point than the original data. Although you can difference the data
more than once, one difference is usually sufficient.
• If the data contain a trend, we can fit some type of curve to the data and then model the residuals from that fit.
Since the purpose of the fit is to simply remove long term trend, a simple fit, such as a straight line, is
typically used.
• For non-constant variance, taking the logarithm or square root of the series may stabilize the variance. For
negative data, you can add a suitable constant to make all the data positive before applying the
transformation. This constant can then be subtracted from the model to obtain predicted (i.e., the fitted) values
and forecasts for future points
THANK YOU…!

You might also like