Time is an amazing factor - a little baby can grow up over time, the weather will change over time, stock prices can change over time
The purpose of time series analysis is to understand the relationships among data values over time
Ways to present time series data
Auto regressive model
Moving average model
Combination of auto regressive and moving average models
Auto regressive model
The data value at the current time spot is built on top of the data values at the previous time spots
Moving average model
The current data value is a result from previous unexpected events
ARMA model
Combination of auto regressive and moving average models
The first step in time series analysis is to ensure the data follows a stationary data assumption - constant mean and constant variance throughout the entire time series
Differencing
1. Subtract previous values from the current value
2. Can do one-lag differencing, two-lag differencing, etc.
3. Used to transform non-stationary data into stationary data
Differencing techniques can be applied to process seasonal data and transform it into stationary data
The techniques and models learned in this lecture series can be applied to a broader range of disciplines beyond financial time series data analysis, such as AI, machine learning, and pattern recognition
Univariatemodels
Variables are modelled and predicting using only information contained in: Own past values, Current and past values of an error term
Univariate models
Different from multivariate models where relationships between several variables are studied
Usually a-theoretical – models are constructed to capture important features of the data, not based on theory
Useful when the factors influencing the variable of interest are not observable or are measured at a lower frequency
Univariate model example
We want to predict daily stock returns but possible explanatory variables like macroeconomic conditions are available quarterly
ARIMA
The most common class of univariate time series models
ARIMA model components
1. Integration or stationarity (I)
2. Auto-regressive processes (AR)
3. Moving Average processes (MA)
Stationarity
A process is stationary if: its mean and variance are constant over time, The covariance between two time periods depends only on the gap between the two time periods and not the time at which the covariance is computed
Weak stationarity
The mean, variance and autocovariance function of the process do depend on time.
A time series which violates the weak stationarity requirements is a non-stationary or integrated time series
Strictly stationary
All the moments of the probability distribution (not just the mean and variance) are invariant over time
Autocorrelation Function (ACF)
Values of autocovariance vary with unit of measurement, so autocorrelations are usually preferred
The graph of the autocorrelations against lags is the correlogram or autocorrelation function and it completely characterizes a time series
When a process is stationary
We can make predictions about the future by generalizing the model to future time periods
When a process is non-stationary
We cannot generalize the model for several reasons
Non-stationary processes cannot be used for forecasting
White noise process
A purely random process with mean zero, constant variance and is serially uncorrelated
The error term that we assume under the classical linear regression model is a white noise error term
Gaussian white noise process
A white noise process that also follows a normal distribution
Standard regression models can be used, but nothing much to estimate
Moving average processes
The simplest class of time series models - it is a linear combination of white noise processes
Moving average process
1. Depends on the current and previous values of a white noise error term
2. Is a qth order moving average model, denoted MA(q), where θ is a constant
MA(1) process
A first order MA process where Xt = θεt-1 + εt
For an MA(1) process, Xt has the following properties: E(Xt) = 0, Var(Xt) = (1 + θ^2)σ^2, Cov(Xt, Xt-k) = 0 for k ≠ 1, Cov(Xt, Xt-1) = θσ^2
L
Lag operator
Autoregressive (AR) model
A model where the current value of the variable depends on past values that the variable took plus an error term
AR model of order p, denoted as AR(p)
1. Where μ is the constant and ε_t is a white noise error term
2. The lag operator notation can be used to write: φ(L)y_t = μ + ε_t
3. Where φ(L) is known as the characteristic equation
Stationarity of an AR process
Stationarity is a desirable property for an AR model
If non-stationary, previous values of the error term will have an increasing effect on the current value of y_t - this is empirically unlikely
The stationarity of an AR process depends on the coefficients of the model
Generally, to verify stationarity, we consider the roots of the characteristic equation
If all the roots of this equation are greater than 1, the process is stationary
For an AR(1) process, we simply require |φ| < 1
Properties of stationary AR(1) process
E[y_t] = μ/(1-φ)
Var[y_t] = σ^2/(1-φ^2)
The autocorrelation functions shows that the AR process has decaying memory
ACF
Autocorrelation function of a process
PACF
Partial autocorrelation function, measures the correlation between X_t and X_t-k after controlling for observations in between
The PACF is useful for checking for hidden information in the residuals
Correlogram
Plots of the ACF and PACF over different lags
Correlograms
Can be useful for model selection (values of p and q to feed into AR(p) and MA(q) models)