0% found this document useful (0 votes)
37 views45 pages

Time Series

Uploaded by

siddhagawane09
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)
37 views45 pages

Time Series

Uploaded by

siddhagawane09
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
You are on page 1/ 45

Time Series

Time series analysis is a specialized branch of statistics focused on


studying data points collected or recorded sequentially over time.
It incorporates various techniques and methodologies to identify
patterns, forecast future data points, and make informed
decisions based on temporal relationships among variables.
• Time series analysis is a specific way of analyzing a sequence of data
points collected over time.
• In TSA, analysts record data points at consistent intervals over a set
period rather than just recording the data points intermittently or
randomly.
• Time series analysis is a powerful statistical method that examines
data points collected at regular intervals to uncover underlying
patterns and trends.
• This technique is highly relevant across various industries, as it
enables informed decision making and accurate forecasting based on
historical data.
Examples of time series analysis in action include:
• Weather data
• Rainfall measurements
• Temperature readings
• Heart rate monitoring
• Brain monitoring
• Quarterly sales
• Stock prices
• Automated stock trading
• Industry forecasts
• Interest rates
Types of Data

Time Series Data: Comprises observations collected at different


time intervals. It's geared towards analyzing trends, cycles, and
other temporal patterns.
Cross-Sectional Data: Involves data points collected at a single
moment in time. Useful for understanding relationships or
comparisons between different entities or categories at that
specific point.
Pooled Data: A combination of Time Series and Cross-Sectional
data. This hybrid enriches the dataset, allowing for more nuanced
and comprehensive analyses.
Objectives

• To understand how time series works and what factors affect a certain
variable(s) at different points in time.
• Time series analysis will provide the consequences and insights of the
given dataset’s features that change over time.
• Supporting to derive the predicting the future values of the time
series variable.
• Assumptions: There is only one assumption in TSA, which is
“stationary,” which means that the origin of time does not affect the
properties of the process under the statistical factor.
How to Analyze Time Series?

To perform the TSA, we have to follow the following steps:


• Collecting the data and cleaning it
• Preparing Visualization with respect to time vs key feature
• Observing the stationarity of the series. (stationarity means that
the statistical properties of a process generating a time series do not
change over time.)
• Developing charts to understand its nature.
• Model building – AR, MA, ARMA and ARIMA
• Extracting insights from prediction
Time Series Analysis Types

• Models of time series analysis include:


• Classification: Identifies and assigns categories to the data.
• Curve fitting: Plots the data along a curve to study the relationships
of variables within the data.
• Descriptive analysis: Identifies patterns in time series data, like
trends, cycles, or seasonal variation.
• Explanative analysis: Attempts to understand the data and the
relationships within it, as well as cause and effect.
• Exploratory analysis: Highlights the main characteristics of the time
series data, usually in a visual format.
• Forecasting: Predicts future data. This type is based on historical
trends. It uses the historical data as a model for future data,
predicting scenarios that could happen along future plot points.
• Intervention analysis: Studies how an event can change the data.
• Segmentation: Splits the data into segments to show the underlying
properties of the source information.
Significance of Time Series

• TSA is the backbone for prediction and forecasting analysis specific to


time-based problem statements.
• Analyzing the historical dataset and its patterns
• Understanding and matching the current situation with patterns
derived from the previous stage.
• Understanding the factor or factors influencing certain variable(s) in
different periods.
With the help of “Time Series,” we can prepare numerous time-based
analyses and results.
• Forecasting: Predicting any value for the future.
• Segmentation: Grouping similar items together.
• Classification: Classifying a set of items into given classes.
• Descriptive analysis: Analysis of a given dataset to find out what is
there in it.
• Intervention analysis: Effect of changing a given variable on the
outcome.
Important Time Series Terms & Concepts

• Dependence: The relationship between two observations of the


same variable at different periods is crucial for understanding
temporal associations.
• Stationarity: A property where the statistical characteristics like
mean and variance are constant over time; often a prerequisite for
various statistical models.
• Differencing: A transformation technique to turn stationary into
non-stationary time series data by subtracting consecutive or lagged
values.
• Specification: The process of choosing an appropriate analytical
model for time series analysis could involve selection criteria, such as
the type of curve or the degree of differencing.
• Exponential Smoothing: A forecasting method that uses a
weighted average of past observations, prioritizing more recent
data points for making short-term predictions.
• Curve Fitting: The use of mathematical functions to best fit a
set of data points, often employed for non-linear relationships
in the data.
• ARIMA (Auto Regressive Integrated Moving Average): A
widely-used statistical model for analyzing and forecasting time
series data, encompassing aspects like auto-regression,
integration (differencing), and moving average.
Components of Time Series Analysis

The various components of Time Series Analysis


• Trend: In which there is no fixed interval and any divergence within
the given dataset is a continuous timeline. The trend would be
Negative or Positive or Null Trend
• Seasonality: In which regular or fixed interval shifts within the dataset
in a continuous timeline. Would be bell curve or saw tooth
• Cyclical: In which there is no fixed interval, uncertainty in movement
and its pattern
• Irregularity: Unexpected situations/events/scenarios and spikes in a
short time span.
Advantages of Time Series Analysis

1.Data Cleansing : Time series analysis techniques such as smoothing


and seasonality adjustments help remove noise and outliers, making
the data more reliable and interpretable.

2.Understanding Data: Models like ARIMA or exponential smoothing
provide insight into the data's underlying structure. Autocorrelations
and stationarity measures can help understand the data's true nature.

3.Forecasting: One of the primary uses of time series analysis is to
predict future values based on historical data. Forecasting is
invaluable for business planning, stock market analysis, and other
applications.
4.Identifying Trends and Seasonality: Time series analysis can uncover
underlying patterns, trends, and seasonality in data that might not be
apparent through simple observation.

5.Visualizations: Through time series decomposition and other techniques,
it's possible to create meaningful visualizations that clearly show trends,
cycles, and irregularities in the data.

6.Efficiency: With time series analysis, less data can sometimes be more.
Focusing on critical metrics and periods can often derive valuable insights
without getting bogged down in overly complex models or datasets.

7.Risk Assessment: Volatility and other risk factors can be modeled over
time, aiding financial and operational decision-making processes.
Limitations of Time Series Analysis.
• Similar to other models, the missing values are not supported by TSA
• The data points must be linear in their relationship.
• Data transformations are mandatory, so they are a little expensive.
• Models mostly work on Uni-variate data
Time Series Analysis Techniques

• Moving Average: Useful for smoothing out long-term trends. It is


ideal for removing noise and identifying the general direction in
which values are moving.
• Exponential Smoothing: Suited for univariate data with a systematic
trend or seasonal component. Assigns higher weight to recent
observations, allowing for more dynamic adjustments.
• Autoregression: Leverages past observations as inputs for a
regression equation to predict future values. It is good for short-term
forecasting when past data is a good indicator.
• Decomposition: This breaks down a time series into its core
components—trend, seasonality, and residuals—to enhance the
understanding and forecast accuracy.
• Time Series Clustering: Unsupervised method to categorize
data points based on similarity, aiding in identifying archetypes
or trends in sequential data.

• Wavelet Analysis: Effective for analyzing non-stationary time


series data. It helps in identifying patterns across various scales
or resolutions.

• Intervention Analysis: Assesses the impact of external events


on a time series, such as the effect of a policy change or a
marketing campaign.
• Box-Jenkins ARIMA models: Focuses on using past behavior
and errors to model time series data. Assumes data can be
characterized by a linear function of its past values.

• Box-Jenkins Multivariate models: Similar to ARIMA, but


accounts for multiple variables. Useful when other variables
influence one time series.

• Holt-Winters Exponential Smoothing: Best for data with a


distinct trend and seasonality. Incorporates weighted averages
and builds upon the equations for exponential smoothing.
What Is the Box-Jenkins Model?

• The Box-Jenkins Model is a mathematical model designed to forecast


data ranges based on inputs from a specified time series. The Box-
Jenkins Model can analyze several different types of time series data
for forecasting purposes.
• This methodology uses differences between data points to determine
outcomes.
• It allows the model to identify trends using autoregresssion, moving
averages, and seasonal differencing to generate forecasts.
• Autoregressive integrated moving average (ARIMA) models are a form
of Box-Jenkins model. The terms ARIMA and Box-Jenkins are
sometimes used interchangeably.
• The Box-Jenkins Model is a forecasting methodology using regression
studies on time series data.
• The methodology is predicated on the assumption that past
occurrences influence future ones.
• The Box-Jenkins Model is best suited for forecasting within time
frames of 18 months or less.
• Autoregressive integrated moving average (ARIMA) models are a form
of Box-Jenkins model.
Understanding the Box-Jenkins Model

• Box-Jenkins Models are used for forecasting a variety of anticipated data


points or data ranges, including business data and future security prices.
• The Box-Jenkins Model was created by two mathematicians: George Box
and Gwilym Jenkins. The two mathematicians discussed the concepts that
comprise this model in a 1970 publication called "Time Series Analysis:
Forecasting and Control."
• Estimations of the parameters of the Box-Jenkins Model can be very
complicated. Therefore, similar to other time-series regression models, the
best results will typically be achieved through the use of programmable
software. The Box-Jenkins Model is also generally best suited for short-
term forecasting of 18 months or less.
Box-Jenkins Methodology

• The Box-Jenkins Model may be one of several, time series analysis


models a forecaster will encounter when using programmed
forecasting software. In many cases, the software will be programmed
to automatically use the best fitting forecasting methodology based
on the time series data to be forecasted. Box-Jenkins is reported to be
a top choice for data sets that are mostly stable and have
low volatility.
• The Box-Jenkins Model forecasts data using three principles:
autoregression, differencing, and moving average. These three principles
are known as p, d, and q, respectively. Each principle is used in the Box-
Jenkins analysis; together, they are collectively shown as ARIMA (p, d, q).
• The autoregression (p) process tests the data for its level of stationarity. If
the data being used is stationary, it can simplify the forecasting process. If
the data being used is non-stationary it will need to be differenced (d). The
data is also tested for its moving average fit (which is done in part q of the
analysis process). Overall, initial analysis of the data prepares it for
forecasting by determining the parameters (p, d, and q), which are then
applied to develop a forecast.
Autoregressive Integrated Moving Average
(ARIMA)
• Box-Jenkins is a type of autoregressive integrated moving average
(ARIMA) model that gauges the strength of one dependent variable
relative to other changing variables. The model's goal is to predict
future securities or financial market moves by examining the
differences between values in the series instead of through actual
values.
• An ARIMA model can be understood by outlining each of its
components as follows:
• Autoregression (AR): refers to a model that shows a changing variable
that regresses on its own lagged, or prior, values.
• Integrated (I): represents the differencing of raw observations to
allow for the time series to become stationary, i.e., data values are
replaced by the difference between the data values and the previous
values.
• Moving average (MA): incorporates the dependency between an
observation and a residual error from a moving average model
applied to lagged observations.
Autocorrelation
• Autocorrelation is a mathematical representation of the degree of
similarity between a given time series and a lagged version of itself over
successive time intervals. It's conceptually similar to the correlation
between two different time series, but autocorrelation uses the same time
series twice: once in its original form and once lagged one or more time
periods.
• For example, if it's rainy today, the data suggests that it's more likely to rain
tomorrow than if it's clear today. When it comes to investing, a stock might
have a strong positive autocorrelation of returns, suggesting that if it's "up"
today, it's more likely to be up tomorrow, too.
• Naturally, autocorrelation can be a useful tool for traders to utilize;
particularly for technical analysts.
• Autocorrelation represents the degree of similarity between a given
time series and a lagged version of itself over successive time
intervals.
• Autocorrelation measures the relationship between a variable's
current value and its past values.
• An autocorrelation of +1 represents a perfect positive correlation,
while an autocorrelation of -1 represents a perfect negative
correlation.
• Technical analysts can use autocorrelation to measure how much
influence past prices for a security have on its future price.
Dependency on Auto correlation
• Correlation measures the relationship between two variables,
whereas autocorrelation measures the relationship of a variable with
lagged values of itself.
• An autocorrelation of +1 represents a perfect positive correlation,
while an autocorrelation of -1 represents a perfect negative
correlation.
• When calculating autocorrelation, the result can range from -1 to +1.
• An autocorrelation of +1 represents a perfect positive correlation (an
increase seen in one time series leads to a proportionate increase in
the other time series).
• On the other hand, an autocorrelation of -1 represents a
perfect negative correlation (an increase seen in one time series
results in a proportionate decrease in the other time series).
Moving Average Model

• Moving Average Models are a type of time series


analysis model usually used in econometrics to forecast trends
and understand patterns in time series data.
• In moving average models the present value of the time series
depends on the linear combination of the past white noise error
terms of the time series.
• In time series analysis moving average is denoted by the letter
“q” which represents the order of the moving average model,
or in simple words we can say the current value of the time
series will depend on the past q error terms.
• Therefore, the moving average model of order q could be
represented as:
• For example, if we consider MA(1) model, in this model the
present value of the time series will only depend on a single
past error term and the time series becomes:

• From this observation we can also conclude one of the most


important aspects of moving average models that the higher
the value of the order of moving average model (q), the model
will have longer memory and dependence on the past values.
Concept Related to Moving Average:

• Stationarity: Stationarity is the principle of time series data that


conveys that the statistical properties of the data doesn’t
change with time, the mean of the data remains the same or
we can also say that the data fluctuates around a certain value,
the standard deviation of the time series data nearly remains
constant, and there must not be any seasonality in the time
series data or there is no periodic behavior in the data.
• Differencing: Differencing is one of the most important steps
to consider during time series analysis, after taking a peek at
the original time series data, if the data is not stationary and
contains a lot of trends then differencing must be considered
since for accurate time series data analysis the data must be
stationary. In regular differencing the current time series data is
subtracted by the previous data point.
• White Noise: White noise is the error term which has the mean
of zero and a constant standard deviation with no correlation of
the data points with each other. White noise acts as a
benchmark in the forecasting process through time series
modelling, if the forecast error is nor white noise further
modifications could be performed on the model, but if it
reaches a state such that the forecast errors are white noise
then the model would need no further improvements. The
value of white noise series are random and unpredictable
therefore if any time series data is a white noise then there is
no method to model or forecast it.
Autoregressive (AR) Model for Time Series

• Autoregressive models belong to the family of time series


models. These models capture the relationship between an
observation and several lagged observations (previous time
steps). The core idea is that the current value of a time series
can be expressed as a linear combination of its past values,
with some random noise.
• Mathematically, an autoregressive model of order p, denoted
as AR(p), can be expressed as:

You might also like