0% found this document useful (0 votes)
14 views

time-series-cheatsheet-en

The document provides a comprehensive overview of time series analysis, including definitions, assumptions, and properties of various models. It discusses trends, seasonality, autocorrelation, stationarity, and cointegration, emphasizing the importance of understanding these concepts for accurate econometric modeling. Additionally, it outlines methods for detecting and correcting issues such as autocorrelation and spurious regression in time series data.

Uploaded by

witifit696
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

time-series-cheatsheet-en

The document provides a comprehensive overview of time series analysis, including definitions, assumptions, and properties of various models. It discusses trends, seasonality, autocorrelation, stationarity, and cointegration, emphasizing the importance of understanding these concepts for accurate econometric modeling. Additionally, it outlines methods for detecting and correcting issues such as autocorrelation and spurious regression in time series data.

Uploaded by

witifit696
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Time Series Cheat Sheet Assumptions and properties Trends and seasonality

By Marcelo Moreno - Universidad Rey Juan Carlos


OLS model assumptions under time series Spurious regression - is when the relation between y and
The Econometrics Cheat Sheet Project
Under this assumptions, the OLS estimator will present x is due to factors that affect y and have correlation with
good properties. Gauss-Markov assumptions extended x, Corr(xj , u) ̸= 0. Is the non-fulfillment of t3.
Basic concepts applied to time series: Trends
Definitions t1. Parameters linearity and weak dependence. Two time series can have the same (or contrary) trend, that
Time series - is a succession of quantitative observations a. yt must be a linear function of the β’s. should lend to a high level of correlation. This, can provoke
of a phenomena ordered in time. b. The stochastic {(xt , yt ) : t = 1, 2, . . . , T } is station- a false appearance of causality, the problem is spurious
There are some variations of time series: ary and weakly dependent. regression. Given the model:
ˆ Panel data - consist of a time series for each observation t2. No perfect collinearity. y t = β0 + β1 x t + u t
of a cross section. ˆ There are no independent variables that are constant: where:
ˆ Pooled cross sections - combines cross sections from Var(xj ) ̸= 0, ∀j = 1, . . . , k yt = α0 + α1 Trend + vt
different time periods. ˆ There is not an exact linear relation between inde- xt = γ0 + γ1 Trend + vt
Stochastic process - sequence of random variables that pendent variables. Adding a trend to the model can solve the problem:
are indexed in time. t3. Conditional mean zero and correlation zero. yt = β0 + β1 xt + β2 Trend + ut
a. There are no systematic errors: E(u | x1 , . . . , xk ) = The trend can be linear or non-linear (quadratic, cubic,
Components of a time series E(u) = 0 → strong exogeneity (a implies b).
ˆ Trend - is the long-term general movement of a series. exponential, etc.)
b. There are no relevant variables left out of the model: Another way is make use of the Hodrick-Prescott filter
ˆ Seasonal variations - are periodic oscillations that are Cov(xj , u) = 0, ∀j = 1, . . . , k → weak exogene- to extract the trend and the cyclical component.
produced in a period equal or inferior to a year, and can ity.
be easily identified on different years (usually are the re- t4. Homoscedasticity. The variability of the residuals is Seasonality
sult of climatology reasons). the same for any x: Var(u | x1 , . . . , xk ) = σu2 A time series with can man- y
ˆ Cyclical variations - are periodic oscillations that are t5. No autocorrelation. Residuals do not contain infor- ifest seasonality. That is,
produced in a period greater than a year (are the result mation about any other residuals: the series is subject to a sea-
of the economic cycle). Corr(ut , us | x1 , . . . , xk ) = 0, ∀t ̸= s sonal variations or pattern,
ˆ Residual variations - are movements that do not fol- t6. Normality. Residuals are independent and identically usually related to climatol-
low a recognizable periodic oscillation (are the result of distributed (i.i.d. so on): u ∼ N (0, σu2 ) ogy conditions.
eventual phenomena). t7. Data size. The number of observations available must For example, GDP (black)
Type of time series models be greater than (k + 1) parameters to estimate. (It is is usually higher in summer
ˆ Static models - the relation between y and x’s is con- already satisfied under asymptotic situations) and lower in winter. Season-
t
temporary. Conceptually: ally adjusted series (red) for
Asymptotic properties of OLS comparison.
yt = β0 + β1 xt + ut Under the econometric model assumptions and the Central ˆ This problem is spurious regression. A seasonal ad-
ˆ Distributed-lag models - the relation between y and Limit Theorem:
x’s is not contemporary. Conceptually: justment can solve it.
ˆ Hold t1 to t3a: OLS is unbiased. E(β̂j ) = βj A simple seasonal adjustment could be creating station-
yt = β0 + β1 xt + β2 xt−1 + · · · + βs xt−(s−1) + ut
ˆ Hold t1 to t3: OLS is consistent. plim(β̂j ) = βj (to t3b ary binary variables and adding them to the model. For
The long term cumulative effect in y when ∆x is:
left out t3a, weak exogeneity, biased but consistent) example, for quarterly series (Qqt are binary variables):
β1 + β2 + · · · + β s
ˆ Hold t1 to t5: asymptotic normality of OLS (then, t6 yt = β0 + β1 Q2t + β2 Q3t + β3 Q4t + β4 x1t + · · · + βk xkt + ut
ˆ Dynamic models - lags of the dependent variable (en-
is necessarily satisfied): u ∼ N (0, σu2 ) Another way is to seasonally adjust (sa) the variables, and
dogeneity). Conceptually: a
yt = β0 + β1 yt−1 + · · · + βs yt−s + ut ˆ Hold t1 to t5: unbiased estimate of σu2 . E(σ̂u2 ) = σu2 then, do the regression with the adjusted variables:
sa
ˆ Combinations of the above, like the rational distributed- ˆ Hold t1 to t5: OLS is BLUE (Best Linear Unbiased Es- zt = β0 + β1 Q2t + β2 Q3t + β3 Q4t + vt → v̂t + E(zt ) = ẑt
sa sa sa
lag models (distributed-lag + dynamic). timator) or efficient. ŷt = β0 + β1 x̂1t + · · · + βk x̂kt + ut
ˆ Hold t1 to t6: hypothesis testing and confidence intervals There are much better and complex methods to seasonally
can be done reliably. adjust a time series, like the X-13ARIMA-SEATS.
TS-25.01-EN - github.com/marcelomijas/econometrics-cheatsheet - CC-BY-4.0 license
Autocorrelation – MA(q) process. ACF: only the first q coefficients Under H0 : No autocorrelation:
are significant, the remaining are abruptly canceled. T · Rû2 t ∼ χ2q or T · Rû2 t ∼ χ2p
The residual of any observation, ut , is correlated with the a a
PACF: attenuated exponential fast decay or sine * H1 : Autocorrelation of order q (or p).
residual of any other observation. The observations are not waves.
independent. Is the non-fulfillment of t5. – Ljung-Box Q test:
– AR(p) process. ACF: attenuated exponential fast * H1 : There is autocorrelation.
Corr(ut , us | x1 , . . . , xk ) = Corr(ut , us ) ̸= 0, ∀t ̸= s decay or sine waves. PACF: only the first p coeffi-
Consequences cients are significant, the remaining are abruptly can- Correction
ˆ OLS estimators still are unbiased. celed. ˆ Use OLS with a variance-covariance matrix estimator
ˆ OLS estimators still are consistent. – ARMA(p, q) process. ACF and PACF: the coef- that is robust to heterocedasticity and autocorre-
ˆ OLS is not efficient anymore, but still a LUE (Linear ficients are not abruptly canceled and presents a fast lation (HAC), for example, the one proposed by Newey-
Unbiased Estimator). decay. West.
ˆ Variance estimations of the estimators are biased: If the ACF coefficients do not decay rapidly, there is ˆ Use Generalized Least Squares (GLS). Supposing
the construction of confidence intervals and the hypoth- a clear indicator of lack of stationarity in mean, which yt = β0 + β1 xt + ut , with ut = ρut−1 + εt , where |ρ| < 1
esis testing is not reliable. would lead to take first differences in the original series. and εt is white noise.
ˆ Formal tests - Generally, H0 : No autocorrelation. – If ρ is known, use a quasi-differentiated model:
Detection Supposing that ut follows an AR(1) process: yt − ρyt−1 = β0 (1 − ρ) + β1 (xt − ρxt−1 ) + ut − ρut−1
ˆ Scatter plots - look for scatter patterns on ut−1 vs. ut . ut = ρ1 ut−1 + εt yt∗ = β0∗ + β1′ x∗t + εt
Ac. Ac. + Ac. − ′
where εt is white noise. where β1 = β1 ; and estimate it by OLS.
ut ut ut
– AR(1) t test (exogenous regressors): – If ρ is not known, estimate it by -for example-
ρ̂1 the Cochrane-Orcutt iterative method (Prais-
ut−1 ut−1 t = se(ρ̂1 ) ∼ tT −k−1,α/2
* H1 : Autocorrelation of order one, AR(1). Winsten method is also good):
ut−1 1. Obtain ût from the original model.
– Durbin-Watson statistic (exogenous regressors and
residual normality): 2. Estimate ût = ρût−1 + εt and obtain ρ̂.
Pn
(û −û )2 3. Create a quasi-differentiated model:
ˆ Correlogram - composed – Y axis: correlation [-1, 1]. d = t=2Pnt û2t−1 ≈ 2 · (1 − ρ̂1 ), 0 ≤ d ≤ 4
t=1 t y t − ρ̂yt−1 = β0 (1 − ρ̂) + β1 (xt − ρ̂xt−1 ) + ut − ρ̂ut−1
of the autocorrelation func- – X axis: lag number. * H1 : Autocorrelation of order one, AR(1). yt∗ = β0∗ + β1′ x∗t + εt
0.5
tion (ACF) and the partial – Blue lines: ±1.96/T d = 0 2 4 ′
where β1 = β1 ; and estimate it by OLS.
ACF (PACF). ρ ≈ 1 0 -1
ACF f (d)
4. Obtain û∗t = yt − (β̂0∗ + β̂1′ xt ) ̸= yt − (β̂0∗ + β̂1′ x∗t ).

IN

IN
1 5. Repeat from step 2. The algorithm ends when the
CO

CO
Rej. H0 Accept H0 Rej. H0
estimated parameters vary very little between iter-
NC

NC
AR + LU No AR AR − ations.

LU
0
ˆ If not solved, look for high dependence in the series.
S

S
IV

IV
E

E
-1
PACF 0 dL dU 2 4−
d
4−
d
4
Exponential smoothing
1 U L
ft = αyt + (1 − α)ft−1
– Durbin’s h (endogenous regressors):
q where 0 < α < 1 is the smoothing parameter.
T
0 h = ρ̂ · 1−T ·υ
where υ is the estimated variance of the coefficient as- Predictions
sociated to the endogenous variable.
-1 Two types of predictions:
* H1 : Autocorrelation of order one, AR(1).
Conclusions differ between autocorrelation processes. ˆ Of the mean value of y for a specific value of x.
– Breusch-Godfrey test (endogenous regressors): it
ˆ Of an individual value of y for a specific value of x.
can detect MA(q) and AR(p) processes (εt is w. noise):
* MA(q): ut = εt − m1 ut−1 − · · · − mq ut−q
* AR(p): ut = ρ1 ut−1 + · · · + ρp ut−p + εt
TS-25.01-EN - github.com/marcelomijas/econometrics-cheatsheet - CC-BY-4.0 license
Stationarity Unit roots From unit root to percentage change
When an I(1) series is strictly positive, it is usually con-
Stationarity allows to correctly identify relations –that stay A process is I(d), that is, integrated of order d, if applying verted to logarithms before taking the first difference to
unchanged with time– between variables. differences d times makes the process stationary. obtain the (approx.) percentage change of the series:
ˆ Stationary process (strict stationarity) - if any collec- When d ≥ 1, the process is called a unit root process or yt − yt−1
tion of random variables is taken and shifted h periods it is said to have an unit root. ∆ log(yt ) = log(yt ) − log(yt−1 ) ≈
yt−1
(time changes), the joint probability distribution should A process have an unit root when the stability condition is
stay unchanged. not met (there are roots on the unit circle). Cointegration
ˆ Non-stationary process - for example, a series with
trend, where at least the mean changes with time.
Strong dependence When two series are I(1), but a linear combination of
Most of the time, economics series are strongly dependent
ˆ Covariance stationary process - its a weaker form of them is I(0). If the case, the regression of one series over
(or high persistent). Some examples of unit root I(1): the other is not spurious, but expresses something about
stationarity:
ˆ Random walk - an AR(1) process with ρ1 = 1. the long term relation. Variables are called cointegrated if
– E(xt ) is constant. – Var(xt ) is constant.
yt = yt−1 + et they have a common stochastic trend.
– For any t, h ≥ 1, the Cov(xt , xt+h ) depends only of h,
where {et : t = 1, 2, . . . , T } is an i.i.d. sequence with zero For example, {xt } and {yt } are I(1), but yt − βxt = ut
not of t.
mean and σe2 variance. where {ut } is I(0). (β is the cointegrating parameter).
ˆ Random walk with a drift - an AR(1) process with
Weak dependence ρ1 = 1 and a constant. Cointegration test
Weak dependence replaces the random sampling assump- yt = β0 + yt−1 + et Following the example above:
tion for time series. where {et : t = 1, 2, . . . , T } is an i.i.d. sequence with zero 1. Estimate yt = α + βxt + εt and obtain ε̂t .
ˆ An stationary process {xt } is weakly dependent when mean and σe2 variance. 2. Perform an ADF test on ε̂t with a modified distribution.
xt and xt+h are almost independent as h increases with- Unit root tests The result of this test is equivalent to:
out a limit. ˆ H0 : β = 0 (no cointegration)
ˆ A covariance stationary process is weakly dependent
Test H0 Reject H0 ˆ H1 : β ̸= 0 (cointegration)
ADF I(1) tau < Critical value if test statistic > critical value, reject H0 .
if the correlation between xt and xt+h tends to 0 fast
enough when h → ∞ (they are not asymptotically corre- KPSS I(0) level mu > Critical value
lated). I(0) trend tau > Critical value Heterocedasticity on time series
Weakly dependent processes are known as integrated of Phillips-Perron I(1) Z-tau < Critical value
Zivot-Andrews I(1) tau < Critical value The assumption affected is t4, which leads OLS to be
order zero, I(0). Some examples: not efficient.
ˆ Moving average - {xt } is a moving average of order q, From unit root to weak dependence Use tests like Breusch-Pagan or White’s, where H0 : No het-
MA(q): Integrated of order one, I(1), means that the first dif- erocedasticity. It is important for the tests to work that
xt = et + m1 et−1 + · · · + mq et−q ference of the process is weakly dependent or I(0) (and there is no autocorrelation.
where {et : t = 0, 1, . . . , T } is an i.i.d. sequence with zero usually, stationary). For example, let {yt } be a random
mean and σe2 variance. walk: ARCH
ˆ Autoregressive process - {xt } is an autoregressive pro- ∆yt = yt − yt−1 = et y, ∆y An autoregressive conditional heterocedasticity (ARCH),
cess of order p, AR(p): where {et } = {∆yt } is i.i.d. is a model to analyze a form of dynamic heterocedasticity,
xt = ρ1 xt−1 + · · · + ρp xt−p + et where the error variance follows an AR(p) process.
where {et : t = 1, 2, . . . , T } is an i.i.d. sequence with zero Note: Given the model: yt = β0 + β1 zt + ut where, there is AR(1)
mean and σe2 variance. ˆ The first difference of a se- and heterocedasticity:
Stability condition: if 1−ρ1 z−· · ·−ρp z p = 0 for |z| > 1 ries removes its trend. E(u2t | ut−1 ) = α0 + α1 u2t−1
then {xt } is an AR(p) stable process that is weakly de- ˆ Logarithms of a series sta- GARCH
pendent. For AR(1), the condition is: |ρ1 | < 1. bilizes its variance. A general autoregressive conditional heterocedasticity
ˆ ARMA process - is a combination of AR(p) and (GARCH), is a model similar to ARCH, but in this case,
MA(q); {xt } is an ARMA(p, q): t
the error variance follows an ARMA(p, q) process.
xt = et + m1 et−1 + · · · + mq et−q + ρ1 xt−1 + · · · + ρp xt−p

TS-25.01-EN - github.com/marcelomijas/econometrics-cheatsheet - CC-BY-4.0 license

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy