0% found this document useful (0 votes)
21 views11 pages

Time Series Analysis Techniques Guide

Time Series Analysis involves the examination of data points collected over time to identify trends, seasonal patterns, and other variations for forecasting. It includes methods for data editing to ensure quality, and various models (additive, multiplicative, mixed) to analyze the components of time series data. Key methods for measuring trends and seasonal variations are discussed, emphasizing the importance of accurate data handling and model selection.

Uploaded by

meenanomics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views11 pages

Time Series Analysis Techniques Guide

Time Series Analysis involves the examination of data points collected over time to identify trends, seasonal patterns, and other variations for forecasting. It includes methods for data editing to ensure quality, and various models (additive, multiplicative, mixed) to analyze the components of time series data. Key methods for measuring trends and seasonal variations are discussed, emphasizing the importance of accurate data handling and model selection.

Uploaded by

meenanomics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Time Series Analysis

Time Series Analysis

Definitions

A Time Series is a sequence of data points measured at successive points in time, typically at uniform
time intervals (e.g., daily stock prices, monthly sales figures, quarterly GDP). The primary characteristic
of time series data is that observations are dependent on previous observations.

Time Series Analysis is a statistical technique that deals with time series data or trend analysis. It
involves methods for analyzing time series data in order to extract meaningful statistics and other
characteristics of the data. Its main goals are understanding the underlying causes of the observed
phenomena and forecasting future values.

Editing of Data

Editing of data in time series analysis involves scrutinizing the collected data to detect and correct
errors, inconsistencies, or omissions before analysis. This ensures data quality and reliability.

Important Information:

Purpose: To ensure accuracy, completeness, consistency, and uniformity of data.

Common Issues:

Missing Values: Gaps in the data (e.g., a day's stock price is missing).
Outliers/Anomalies: Data points that deviate significantly from the rest of the series (e.g., a
sudden, inexplicable spike in sales).

Inconsistencies: Data recorded in different units or with different conventions.

Errors: Typos, measurement errors.

Methods:

Visual Inspection: Plotting the data to identify obvious anomalies.

Statistical Methods: Using statistical tests to detect outliers or unusual patterns.

Imputation: Filling missing values using methods like mean imputation, linear interpolation, or
more sophisticated techniques like ARIMA-based imputation.

Smoothing/Filtering: Applying techniques to reduce noise and highlight underlying patterns.

Components of a Time Series

Time series data is typically decomposed into several underlying components, each representing a
different type of variation:

Secular Trend (T)


Definition: The long-term, underlying movement or general direction of the series over an extended
period. It represents the smooth, general progression of the series, ignoring short-term fluctuations. It
can be upward, downward, or relatively stable.

Important Information:

Reflects fundamental changes in factors like population growth, technological advancements,


economic development, or changes in consumer preferences.

Can be linear or curvilinear.

Seasonal Variation (S)

Definition: Regular, repetitive patterns of change that occur within a fixed period (typically a year) and
repeat year after year. These variations are often linked to seasons, holidays, social customs, or
administrative practices.

Important Information:

The period of seasonality is usually known (e.g., daily, weekly, monthly, quarterly).

Examples: Higher retail sales during festive seasons, increased ice cream sales in summer, higher
utility bills in winter.

Cyclic Variation (C)

Definition: Oscillations or swings in a time series that occur over a period longer than a year, but are
not necessarily regular or fixed in their duration or amplitude. These are often associated with business
cycles (prosperity, recession, depression, recovery).

Important Information:

Unlike seasonal variations, the period of a cycle is usually not fixed and can vary from 2 to 10 years
or more.

Often related to economic booms and busts.

Irregular Variations (I)

Definition: Erratic, unpredictable, and random fluctuations in a time series that are not attributable to
trend, seasonal, or cyclic components. These are often caused by unforeseen and non-recurring events.

Important Information:

Examples: Earthquakes, floods, strikes, wars, sudden policy changes, fads.

Also known as random or residual variations.

Models for Time Series

Time series models describe how these components combine to form the observed data. The two most
common models are:
1. Additive Model: Assumes that the components are independent of each other, and their effects
simply add up.
Formula:

Yt = T t + S t + C t + I t
​ ​ ​ ​ ​

Where:

Yt : Observed value at time t


Tt : Trend component at time t


St : Seasonal component at time t


Ct : Cyclic component at time t


It : Irregular component at time t


Important Information: Used when the magnitude of seasonal and cyclic fluctuations does not
change with the level of the trend (i.e., absolute changes are constant).

2. Multiplicative Model: Assumes that the components are expressed as proportions or percentages
of each other, and their effects multiply.
Formula:

Yt = T t × S t × C t × I t
​ ​ ​ ​ ​

Important Information: Used when the magnitude of seasonal and cyclic fluctuations increases or
decreases with the level of the trend (i.e., relative changes are constant). This is more common for
economic series.

Sometimes, the irregular component is considered additive to the multiplicative combination of


others: Yt ​ = T t × S t × Ct + I t .
​ ​ ​ ​

3. Mixed Model: A combination of additive and multiplicative elements. For example, if irregular
variations are additive to the multiplicative combination of T, S, and C.

Methods of Measuring Linear Trend

These methods aim to estimate the trend component when the underlying trend is approximately linear.

1. Graphic Method (Freehand Curve Method)

Description: The simplest and most subjective method. Data points are plotted on a graph, and a
smooth, straight line is drawn through the center of the points, aiming to capture the general direction of
the data.

Important Information:

Advantages: Simple, quick, easily understood.

Disadvantages: Highly subjective, accuracy depends on the judgment of the analyst, not suitable
for forecasting or precise analysis.

2. Semi-Average Method
Description: The time series data is divided into two equal halves (or nearly equal if n is odd). The
arithmetic mean (semi-average) is calculated for each half. These two semi-averages are plotted at the
midpoints of their respective time periods. A straight line is then drawn connecting these two points,
representing the trend line.

Formula:

If n is even, data is split into n/2 observations each.

If n is odd, the middle observation is dropped, and the remaining n − 1 observations are split into
two halves.
ˉ1 for the first half and Yˉ2 for the second half.
Calculate Y ​ ​

Plot (midpoint of first half, Yˉ1 ) and (midpoint of second half, Yˉ2 ).
​ ​

Important Information:

Advantages: Simple, objective (gives same result for different users).

Disadvantages: Assumes a linear trend (even if it's not), sensitive to extreme values, only two
points determine the line, so it doesn't utilize all data effectively.

3. Least Squares Method

Description: This is the most widely used and statistically sound method. It fits a straight line to the
data such that the sum of the squared vertical distances (residuals) from each data point to the line is
minimized. This line is called the line of best fit.

^t
Formula for a linear trend line: Y ​ = a + bt
Where:

Y^t : Trend value for time t


a: Y-intercept (value of Y^ when t = 0)


b: Slope of the trend line (change in Y^ for a one-unit change in t)
The values of a and b are calculated using the following normal equations (derived from minimizing the
sum of squared errors):

1. ∑ Yt ​ = na + b ∑ t
2. ∑ tYt ​ = a ∑ t + b ∑ t2

Simplification using Shift of Origin (Coding):


To simplify calculations, especially when t values are large, we can set the middle of the time period as
the origin, making ∑ t = 0.

If n is odd, the middle year is t = 0, then t values are … , −2, −1, 0, 1, 2, ….


If n is even, the average of the two middle years is t = 0, then t values are … , −3, −1, 1, 3, …
(multiplied by 2 for convenience to avoid fractions).
When ∑ t = 0, the normal equations simplify to:

1. ∑ Yt ​
= na ⇒ a = ∑ Yt
n

​ = Yˉ
∑ tYt
2. ∑ tYt ​ = b ∑ t2 ⇒ b = ∑ t2

Important Information:

Advantages: Objective, statistically sound, provides unique best-fitting line, can be used for
forecasting and measuring error.

Disadvantages: Assumes a linear trend, sensitive to outliers.

Shift of Origin

Description: As explained above, this is a technique used in the least squares method to simplify
calculations by re-centering the time variable (t) so that its sum is zero.

Formula:

If n is odd: ti ​ = Yeari − Middle Year​

If n is even: ti= (Yeari − Average of two middle years) × 2 (to get integer values)
​ ​

Important Information: Shifts the t = 0 point to the middle of the series. The calculated a and b
are for this new origin. If forecasts are made using the transformed t, they refer to the actual year.

Curvilinear Trend

Description: When the long-term movement of a time series does not follow a straight line, a curvilinear
trend model is used. This often involves fitting higher-degree polynomial equations or exponential
curves.

Common Models:

^t
Quadratic Trend: Y ​ = a + bt + ct2
Normal equations (solved using least squares principle):
1. ∑ Yt ​ = na + b ∑ t + c ∑ t2
2. ∑ tYt ​ = a ∑ t + b ∑ t2 + c ∑ t3
3. ∑ t2 Yt ​ = a ∑ t2 + b ∑ t3 + c ∑ t4
If origin is shifted such that ∑ t = 0 and ∑ t3 = 0 (which is always true for symmetrically
chosen t values), the equations simplify to:
1. ∑ Yt ​ = na + c ∑ t2
∑ tYt
2. ∑ tYt ​ = b ∑ t2 ⇒ b = ∑ t2

3. ∑ t2 Yt ​
= a ∑ t2 + c ∑ t4
(Equations 1 and 3 are then solved simultaneously for a and c).
^t
Exponential Trend: Y ​ = abt
^t
This can be linearized by taking logarithms: log Y ​ = log a + t log b.
Let Yt′ ​ = log Yt , a′ = log a, b′ = log b. Then Yt′ = a′ + b′ t.
​ ​

Normal equations for a′ and b′ are the same as linear trend (but with Y ′ instead of Y ).

Important Information:

Used when growth or decline is not at a constant rate but accelerating or decelerating.
Choice of curve depends on scatter plot visualization and goodness-of-fit measures.

Methods of Measuring Seasonal Variations

These methods aim to isolate the seasonal component from the time series data. Typically, the trend is
first removed, and then seasonal indices are calculated. The multiplicative model is often assumed.

1. Simple Average Method

Description: A crude method. It calculates the average of the data for each specific season (e.g.,
average Jan sales, average Feb sales, etc.) over all years. These averages are then expressed as
percentages of the grand average (average of all seasonal averages).

Formula:

ˉi
1. Calculate average for each season (e.g., each month or quarter): S = ∑ Yi ​

(where Yi
Number of years
​ ​ ​

are observations for season i across years).


ˉ ∑ Sˉi
2. Calculate the grand average of these seasonal averages: Y =

Number of seasons

Sˉi
3. Seasonal Index for season i: SIi = ​

× 100

​ ​

Important Information:

Advantages: Simple to understand and calculate.

Disadvantages: Does not eliminate the influence of trend, cyclic, or irregular variations. Assumes
constant seasonal patterns.

2. Ratio to Trend Method

Description: This method explicitly removes the trend component before calculating seasonal indices.
It assumes a multiplicative model.

Steps:

1. Calculate Trend Values (Tt ): Fit a trend line (usually by least squares) to the original data Yt .
​ ​

2. Calculate Ratios to Trend (Yt /Tt ): Divide each observed value by its corresponding trend value.
​ ​

These ratios contain seasonal, cyclic, and irregular components (S × C × I ).


3. Average Ratios for Each Season: For each season (e.g., January), calculate the average of all the
ratios obtained in step 2 for that specific season across all years. This averaging helps to smooth
out cyclic and irregular variations.
4. Adjust Seasonal Averages: Sum the seasonal averages. If the sum is not equal to (Number of
Seasons × 100), adjust them proportionally to ensure they sum to the correct value (e.g., 1200 for
monthly data, 400 for quarterly data).

Formula:

Ratios: Rt ​ = Yt
Tt


​ × 100
ˉi
Average of Ratios for season i: R= Average(Rfor season i ) ​ ​

ˉ i × Number of Seasons×100
Seasonal Index for season i: SIi = R ˉ ∑ Ri
​ ​ ​

Important Information:

Advantages: Eliminates trend effect, more accurate than simple average.


Disadvantages: Sensitive to the accuracy of trend line fitting.

3. Ratio to Moving Average Method (Trend-Cum-Seasonal Method)

Description: The most common and robust method for measuring seasonal variations in a
multiplicative model. It effectively removes both trend and cyclic components by using a centered
moving average.

Steps:

1. Calculate Moving Average (MA): Compute a centered moving average of the original series. The
period of the moving average should match the period of seasonality (e.g., 12-month MA for monthly
data, 4-quarter MA for quarterly data). This MA represents the T × C component.
For a 4-quarter MA: Average of first 4 quarters, then second 4, etc. Then center these averages
(average of two adjacent 4-quarter MAs for the midpoint).

For a 12-month MA: Average of first 12 months, then second 12, etc. Then center these
averages (average of two adjacent 12-month MAs for the midpoint).

2. Calculate Ratios to Moving Average (Yt /M At ): Divide each original value (Yt ) by its
​ ​ ​

corresponding centered moving average (M At ). These ratios represent the S ​ × I component (as
Yt /(Tt × Ct ) ≈ St × It ).
​ ​ ​ ​ ​

3. Average Ratios for Each Season: For each season (e.g., January), calculate the median (or
mean, though median is preferred to minimize irregular effects) of all the ratios obtained in step 2 for
that specific season across all years. This averaging removes the irregular component.

4. Adjust Seasonal Averages: Adjust the seasonal averages so that their sum equals (Number of
Seasons × 100).

Formula:

M At : Centered moving average at time t.


Ratios: Rt ​ = Yt
M At


​ × 100
ˉi
Seasonal average for season i: S ​ = Median or Mean(Rfor season i ) ​
Seasonal Index for season i: SIi ​ = Sˉi ×

Number of Seasons×100
∑ Sˉi

Important Information:

Advantages: Effectively removes trend and cyclic variations, robust against outliers (if median is
used), widely used.

Disadvantages: Data is lost at the beginning and end of the series due to MA calculation. Requires
at least 3-4 cycles of data.

4. Specific and Typical Seasonals

Specific Seasonals: Refers to the individual seasonal-irregular ratios (S × I ) obtained from


methods like Ratio to Moving Average for each specific time point.

Typical Seasonals: These are the final adjusted seasonal indices (SIi ) that represent the typical

seasonal pattern for each period (e.g., the typical January index, typical February index, etc.). They
are derived by averaging (or taking the median of) the specific seasonals.

5. Link Relative Method

Description: This method focuses on the ratios of each observation to the preceding observation within
a season. It then averages these "link relatives" for each season. This method is less common now due
to its complexity and sensitivity to irregular fluctuations.

Steps:

1. Calculate Link Relatives (LR): For each observation, calculate LRt ​


= (Yt /Yt−1 ) × 100.
​ ​

2. Average Link Relatives for Each Season: For each season (e.g., January), calculate the average
(mean or median) of all link relatives that correspond to that season over different years.

3. Chain Relatives (CR): Convert these average link relatives into chain relatives using a base,
Average LRi ×CRi−1
usually the first season's average link relative as 100. CRi ​ = 100

. The last chain


relative should ideally be close to 100.

4. Adjust Chain Relatives: Adjust the chain relatives for trend. This involves calculating a correction
factor based on the difference between the last chain relative and 100, distributed evenly.

5. Calculate Seasonal Indices: Express the adjusted chain relatives as percentages of their average.

Important Information:

Advantages: Can handle varying seasonal patterns to some extent.

Disadvantages: Calculations are more complex, prone to accumulating errors, and highly sensitive
to extreme values.

Methods of Measuring Cyclic Variations

Measuring cyclic variations is more challenging than trend or seasonal variations because cycles are
not of fixed length or amplitude. They are usually estimated after removing trend and seasonal
components.
1. Residual Method (Fluctuation Method)

Description: This is the most common approach for estimating cyclic and irregular variations. It
calculates the residuals after removing the trend and seasonal components from the original data.
These residuals are then assumed to be primarily C × I (in multiplicative model) or C + I (in additive
model).

Steps (for Multiplicative Model):

1. Estimate Trend (Tt ): Using Least Squares Method.


2. Estimate Seasonal Indices (SIt ): Using Ratio to Moving Average Method. ​

3. Deseasonalize the Series (Yt /SIt ): Divide the original values by the seasonal indices. This gives
​ ​

T × C × I/S ≈ T × C × I/St (approximately T × C × I if SIt are accurate). Or, more ​ ​

precisely, Yt /SIt gives Tt × Ct × It .


​ ​ ​ ​ ​

4. Calculate Cyclic-Irregular Component (Ct ​ × It ): Divide the deseasonalized series by the trend

values: (Tt ​ × Ct × It )/Tt = Ct × It .


​ ​ ​ ​ ​

5. Smooth to Isolate Cyclic (Ct ): Apply a moving average (often a long one, e.g., 3 or 5 years) to the

C × I series to smooth out the irregular component and reveal the underlying cyclic pattern.

Important Information:

This method is widely used.

The separation of cyclic and irregular components can be subjective.

2. First Difference Method

Description: This method focuses on the differences between consecutive observations (ΔYt ​ = Yt −
Yt−1 ). Taking first differences can help to remove a linear trend and reduce seasonality, thus

highlighting shorter-term fluctuations.

Formula: ΔYt ​ = Yt − Yt−1


​ ​

Important Information:

Primarily used for stationarity testing in advanced time series (ARIMA models).

Can help in identifying short-term cycles but doesn't directly measure cyclical variations in their
traditional sense (periods of boom/bust).

3. Percentage Ratio Method

Description: This is not a distinct method for measuring cycles but often used in conjunction with the
residual method. The C × I component derived from the residual method is often expressed as
percentages.

Yt
Formula: Ct ​ × It = ​

Tt ×SIt


​ × 100
Important Information: This expresses the combined cyclic and irregular variations as a percentage
deviation from the trend-seasonal baseline.
4. Direct Method

Description: This term is somewhat ambiguous. It might refer to directly observing and defining cycles
from the raw data or a smoothed series without explicit decomposition formulas. It is not a formal
statistical method for measuring cycles. It could also refer to direct calculation of residuals after only
trend has been removed.

5. Reference Cycle Analysis

Description: A method developed by the National Bureau of Economic Research (NBER) to analyze
business cycles. It involves identifying specific reference cycles (periods of expansion and contraction)
for the overall economy and then analyzing how individual economic series conform to or deviate from
these reference cycles.

Important Information:

Focuses on the timing and amplitude of cycles across different economic indicators.

Does not rely on a fixed mathematical formula for measuring cycles for a single series, but rather
comparative analysis.

6. Harmonic Analysis

Description: A more advanced mathematical technique that uses Fourier series to decompose a time
series into a sum of sine and cosine waves (harmonics) of different frequencies and amplitudes. This
can reveal underlying periodicities (cycles).

Formula (Conceptual):
m
Yt = A0 + ∑k=1 (Ak cos(2πfk t) + Bk sin(2πfk t))
​ ​ ​ ​ ​ ​ ​

Where fk are frequencies, and Ak , Bk are amplitudes.


​ ​ ​

Important Information:

Primarily used for detecting strong, regular cyclical patterns (e.g., in engineering, physics).

Less commonly used for economic cycles, which are often irregular.

Requires spectral analysis techniques.

Measurement of Irregular Variations

Irregular variations (It ) are what remains after the other components (Trend, Seasonal, Cyclic) have

been removed.

Formula (Multiplicative Model):


Yt
It =

Tt × S t × C t
​ ​


Formula (Additive Model):


I t = Yt − T t − S t − C t
​ ​ ​ ​ ​

Important Information:
Often considered random noise.

They are difficult to forecast directly because of their unpredictable nature.


Can be identified by analyzing the residuals from a model that accounts for T, S, and C.

Moving Average Method (for Smoothing)

While a core part of the "Ratio to Moving Average" method for seasonality, the Moving Average
Method can also be used as a general smoothing technique to remove short-term fluctuations
(seasonal and irregular) to reveal the underlying trend and cyclic components.

Description: Calculates the average of observations over a specified period, and then this period is
moved forward by one time unit for the next calculation.

Formula (e.g., for a 3-period simple moving average):


Yt−1 +Yt +Yt+1
M At =​

3
​ ​

(for centered MA)


Yt +Yt+1 +Yt+2
M At =​

3
​ ​

(for trailing MA)


Important Information:

Purpose: To smooth out short-term (e.g., seasonal, irregular) fluctuations to reveal longer-term
patterns (trend and cycle).

Period Selection: The length of the moving average window is crucial. If a seasonal component
exists, the period of the moving average should match the period of seasonality to eliminate it
effectively (e.g., 12 for monthly data, 4 for quarterly data).

Centering: For an even number of periods (e.g., 4-quarter MA), an additional step of centering is
required (averaging two adjacent MAs) to align the average with the actual time point.

Limitations: Data is lost at the beginning and end of the series. Does not provide an equation for
trend.

You might also like