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

Introduction To Time Series

Time series analysis is essential for forecasting trends, understanding data patterns, and making informed decisions across various fields. It can be categorized into univariate and multivariate analyses, utilizing models like ARIMA and VAR, and involves methods such as decomposition and stationarity tests. The document also provides examples of time series data, including financial metrics and climate data, while discussing statistical models and forecasting techniques.

Uploaded by

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

Introduction To Time Series

Time series analysis is essential for forecasting trends, understanding data patterns, and making informed decisions across various fields. It can be categorized into univariate and multivariate analyses, utilizing models like ARIMA and VAR, and involves methods such as decomposition and stationarity tests. The document also provides examples of time series data, including financial metrics and climate data, while discussing statistical models and forecasting techniques.

Uploaded by

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

# Importance of Time Series Analysis:

Forecasting future trends


Understanding patterns and seasonality in data
Identifying relationships between variables over time
Crucial for decision-making in finance, economics, and many other fields
Enables better resource allocation and risk management

## Univariate vs. Multivariate Time Series Analysis:


Univariate: Analyzes a single variable over time
Models: ARIMA, Exponential Smoothing, Prophet
GARCH

Multivariate: Analyzes multiple variables and their interactions over time


Models: VAR (Vector Autoregression), VECM (Vector Error Correction Model), Granger
Causality MGARCH

## Tools and Methods in Time Series Analysis:


Decomposition: Separating trend, seasonality, and residuals
Smoothing: Moving averages, exponential smoothing
Stationarity tests: ADF, KPSS
Autocorrelation and partial autocorrelation analysis
Forecasting models: ARIMA, ETS, Prophet
Evaluation metrics: MAE, RMSE, MAPE

## CC

# Structure of Time Series Data

## Example1: J&J Quarterly EPS


Quarterly earnings per share for the U.S. company Johnson & Johnson. There are 84
quarters (21 years) measured from the first quarter of 1960 to the last quarter of
1980. Modeling such series begins by observing the primary patterns in the time
history. In this case, note the gradually increasing underlying trend and the
rather regular variation superimposed on the trend that seems to repeat over
quarters.

## CC

## CC

# Example 2 GlobalWarming
Global mean land–ocean temperature index from 1850 to 2023. Data are deviations,
measured in degrees centigrade, from the 1951-1980 average. Note an apparent upward
trend in the series during the latter part of the 20th century
that has been used as an argument for the global warming hypothesis.

## CC
## CC

## CC

## Example3: Speech data plot


A small 0.1 second (1000 points) sample of recorded speech for the phrase
"aaa...hhh".

## CC

## Example4 Dow Jones Industrial Average

Daily returns (or percent change) of the Dow Jones Industrial Average (DJIA) from
April 20, 2006 to April 20, 2016. Note the financial crisis of 2008. This data is
typical of return data. The mean of the series appears to be stable with an average
return of approximately zero, however, highly volatile (variable) periods tend to
be clustered together. A problem in the analysis of these type of financial data is
to forecast the volatility of future returns.

Models such as ARCH and GARCH models (Engle, 1982; Bollerslev, 1986) and stochastic
volatility models (Harvey, Ruiz and Shephard, 1994) have been developed to handle
these problems.

## CC

## CC

## CC

## CC

## Example5 - El Nino and Fish Population data


The SOI data set measures changes in air pressure, related to sea surface
temperatures in the central Pacific Ocean. The central Pacific warms every three to
seven years due to the El Niño effect, which has been blamed for various global
extreme weather
events. Both series exhibit repetitive behavior, with regularly repeating cycles
that are easily visible. This periodic behavior is of interest. The series show two
basic oscillations types, an obvious annual cycle (hot in the summer, cold in the
winter), and a slower frequency that seems to repeat about every 4 years.

## CC

Example 1.6 fMRI Imaging


A fundamental problem in classical statistics occurs when we are given a collection
of independent series

## CC

# Time Series Statistical Models


The primary objective of time series analysis is to develop mathematical models
that provide plausible descriptions for sample data. To provide a statistical
setting for describing the character of data that seemingly fluctuate in a random
fashion over time, we assume a time series can
be defined as a collection of random variables indexed according to the order they
are obtained in time. For example, we may consider a time series as a sequence of
random variables, x1; x2; x3;... , where the random variable x1 denotes the value
taken by the series at the first time point, the variable x2 denotes the value for
the second time period, x3 denotes the value for the third time period, and so on.

It is conventional to display a sample time series graphically by plotting the


values of the random variables on the vertical axis, or ordinate, with the time
scale as the abscissa. It is usually convenient to connect the values at adjacent
time periods to reconstruct visually some original hypothetical continuous time
series that might have produced these values as a discrete sample.

AR(1), MA(1), ARMA(1,1) ARIMA(1,1,1)

## No trend
A time series with no trend is characterized by:

Constant mean over time


No systematic increase or decrease in the data
May have fluctuations around the mean, but these are not directional

## CC

## CC

## CC

## CC

## White Noise - White noise is a random signal with specific properties:


Constant mean (usually zero)
Constant variance
No autocorrelation between its values at different times
Each observation is independent and identically distributed

Key characteristics:
Completely random and unpredictable
No pattern or trend
Flat spectral density (equal power across all frequencies)

## CC
## CC

## Random walk
A random walk is a time series where:

Each step is random and independent of previous steps


The current value is the sum of the previous value and a random shock
Has a clear trend, but the direction is unpredictable

Key characteristics:
Non-stationary (mean and variance change over time)
Strong dependence on past values
Difficult to predict future values accurately

## CC

## Another example - AirPassengers

## CC

Year is starting from 1949 and ending with 1961 with 144 observations.
Convert the dataset into timeseries data.

## CC

This data looks stationary and we can go for log transformation for nonstationary
data.

Log transform

## CC

Decomposition of additive time series


Major components of time series

## CC

## CC

In this dataset currently in log form, Month 11 showing -20% downside, and Month 7
and 8 showing 20% upper side.

## CC

Basically, the time series split into three component trend, seasonal and random.

Forecasting
ARIMA - Autoregressive Integrated Moving Average

## CC
ACF and PACF plots
It is always looking into ACF and PACF when we are dealing with time series data.

## CC

The dotted lines are significant bounds. A log 0 its crossing the significance
bound. Within 1 and 1.5 its just touching the significance bounds

Ljung-Box test

## CC

No significant difference was observed that indicates autocorrelation observed at


lag 1 and 1.5 may be due to random chance.

Residual plot

## CC

Most of the values are concentrated at 0 and look normal distribution, same
indicates there is no series problem with the existing model.

Forecast

## CC

## Using tidyquant to download time series data:

## CC

Relevant functions for TS analysis:


# Decomposition

## CC

# Autocorrelation

## CC

# Partial Autocorrelation

## CC

# Stationarity test
## CC

# Moving average

## CC

## ARIMA (AutoRegressive Integrated Moving Average):

History: Developed by Box and Jenkins in the 1970s


Combines autoregressive (AR) and moving average (MA) models with differencing for
non-stationary data
Compares favorably with other methods for short to medium-term forecasting
More flexible than simple exponential smoothing but less so than some modern
machine learning approaches
Steps in ARIMA modeling:

Check for stationarity, difference if necessary


Identify model order (p, d, q) using ACF and PACF plots
Estimate model parameters
Diagnostic checking (residual analysis)
Forecasting
Model evaluation and selection
ARIMA analysis for stock returns:

## CC

## CC

## CC

## Diagnostic analysis for the ARIMA model:

## CC

## CC

A linear combination of values in a time series is referred to, generically, as a


filtered series; hence the command filter in the following code

## CC

You might also like