Fundamentals of Time Series Econometrics
E_MFAE_FTSE
,Table of contents
Week 1 ................................................................................................................................................................................................ 3
Week 2 ................................................................................................................................................................................................ 6
Week 3 .............................................................................................................................................................................................. 10
Week 4 .............................................................................................................................................................................................. 13
Week 5 .............................................................................................................................................................................................. 17
Week 6 .............................................................................................................................................................................................. 20
,Week 1
Deterministic – can be determines by past.
However, no phenomena is deterministic, because unknown factors.
Stochastic Process – it’s a mathematical model which explains, not one random event, but a random event, but rather a whole
sequence of random variables {𝑋𝑡 } ordered in time.
{𝑋𝑡 } – This is a mathematical notation for a sequence of random variables indexed in time.
• Realization
o Single Realization – one run of process o Multiple realizations – many runs of the
one path same process, different paths due to
randomness.
o
o
Time Series components:
• Trend
o Long-term/short-term growth.
• Seasonality
o Always fixed and known period.(time of the year, day of the weak)
• Cyclical
o Always due to economic factors, not fixed periods
Time series can be decomposed into its componenents/
• Additive: 𝑋𝑡 = 𝑇𝑡 + 𝑆𝑡 + 𝑅𝑡 – in items.
• Multiplicative: 𝑋𝑡 = 𝑇𝑡 × 𝑆𝑡 × 𝑅𝑡 – percentages.
o 𝑋𝑡 – in time T.
o T – trend cycle component
o 𝑅𝑡 - unpredictable
o S – seasonal
o log 𝑋 = log 𝑇 × 𝑆 × 𝑅 → log 𝑋 = log 𝑇 + log 𝑆 + log 𝑅 – Logarithms are often used to transform multiplicative
models into additive models
Methods of decomposition
• Classical Decomposition
• X-11 Decomposition
• STL Decomposition
Classical Decomposition
• Trend Cycle computed my moving average.
1
o m-MA: 𝑇̂𝑖 = ∙ ∑𝑘𝑗=−𝑘 𝑥𝑡+𝑗 , where 𝑚 = 2𝑘 + 1
𝑚
▪
• Seasonal component: computed by averaging the deviations from the trend-cycle each season
• Remainder Component: the residuals after removing the trend-cycle and seasonal component.
,Stationarity – we say that time series/stochastic process {𝑋𝑡 } with 𝐸(𝑋𝑡2 ) < ∞ does not change over time. Two mandatory
conditions:
1. 𝜇𝑋 (𝑡) = 𝜇𝑋 – the mathematical expectation (mean value) of the process should not depend on time 𝑡.
a. 𝜇𝑋 (𝑡) – average for a certain period 𝑡.
b. 𝜇𝑋 – total average.
2. 𝛾𝑋 (𝑡, 𝑡 − ℎ) = 𝛾𝑋 (ℎ) – the covariance between 𝑡 and 𝑡 − ℎ (more earlier moment) is dependents solely on the size of
the gap.
a. ℎ – lag.
• Weak stationarity implies that the mean, variance and autocovariances do not change over time.
• Weak stationarity restricts the first and second moments... but is silent about higher moments.
o First and second moments – are mean and variance, higher: skewness, kurtosis.
• restricts the unconditional moments... but the conditional moments can vary
Autocorrelation function –is a measure of the correlation between the time series and a lagged version of itself.
For a weakly stationary time series, the ACF at lag h is defined as:
𝐶𝑜𝑣(𝑋𝑡 , 𝑋𝑡−ℎ ) 𝛾𝑋 (ℎ) 𝛾𝑋 (ℎ)
𝜌𝑋 (ℎ) = = =
√𝑉𝑎𝑟(𝑋𝑡 ) × √𝑉𝑎𝑟(𝑋𝑡−ℎ ) √𝛾𝑋 (0) × √𝛾𝑋 (0) 𝛾𝑋 (0)
• 𝛾𝑋 (0) = 𝐶𝑜𝑣(𝑋𝑡 , 𝑋𝑡 ) = 𝑉𝑎𝑟(𝑋𝑡 )
Estimation:
1
• 𝛾̂𝑋 (ℎ) = × ∑𝑇−ℎ ̅ ̅
𝑡=1 (𝑋𝑡 − 𝑋 )(𝑋𝑡+ℎ − 𝑋 )
𝑇
1
• 𝛾̂𝑋 (0) = × ∑𝑇𝑡=1 (𝑋𝑡 − 𝑋̅)2
𝑇
1
• 𝑋̅ = × ∑𝑇𝑡=1 𝑋̅
𝑇
, Simple Time Series Models
• White noise – this is the simplest possible model of a time series. It can be considered an “ideal coincidence”.
o {𝑋𝑡 } ~ 𝑊𝑁(0, 𝜎𝑋2 )
▪ 𝔼[𝑋ₜ] = 0 – On average, the values of the process are zero.
▪ 𝑉𝑎𝑟(𝑋ₜ) = 𝜎² – there are no periods when values become significantly more or less volatile.
• 𝑉𝑎𝑟(𝑍𝑖 ) = 𝔼[(𝑍𝑖 − 0)²] = 𝔼[𝑍𝑖 ²] = 𝜎²
▪ 𝐶𝑜𝑣(𝑋ₜ, 𝑋𝑡−ℎ ) = 0, 𝑓𝑜𝑟 ℎ ≠ 0 – Knowing the current value does not help predict the future.
𝜎 2 𝑖𝑓 ℎ = 0 𝛾 (ℎ) 1 𝑖𝑓 ℎ = 0
o 𝛾𝑋 (ℎ) = { 𝑋 → 𝑝𝑋 (ℎ) = 𝑋 = {
0 𝑖𝑓 ℎ ≠ 0 𝛾𝑋 (0) 0 𝑖𝑓 ℎ ≠ 0
• Random walk – random and independent of the previous one value.
o 𝑋𝑡 = 𝜀1 + 𝜀2 + ⋯ + 𝜀𝑡
▪ {𝜀𝑡 } ~ 𝑊𝑁(0, 𝜎𝑋2 )
▪ 𝑋𝑡 – total affect.
o 𝑋𝑡 = 𝑋𝑡−1 + 𝜀𝑡
▪ 𝑋1 = 𝜀1
▪ 𝐸[𝑋𝑡 ] = 0
• 𝐸[𝑋𝑡 ] = 𝐸[𝜀1 + 𝜀2 + ⋯ + 𝜀𝑡 ] = 𝐸[𝜀1 ] + ⋯ + 𝐸[𝜀𝑡 ] = 0
▪ 𝑉𝑎𝑟(𝑋𝑡 ) = 𝑉𝑎𝑟(𝜀1 + 𝜀2 + ⋯ + 𝜀𝑡 ) = 𝑡 × 𝜎𝜀2
• Variance growth linearly with time t.
o Autocovariance of the random walk is:
▪ 𝛾𝑋 (𝑡, 𝑡 − ℎ) = 𝐶𝑜𝑣(𝑋𝑡 , 𝑋𝑡−ℎ ) = 𝐶𝑜𝑣(𝜀1 + ⋯ + 𝜀𝑡 , 𝜀1 + ⋯ + 𝜀𝑡−ℎ ) = 𝐶𝑜𝑣(𝜀1 , 𝜀1 ) + ⋯ +
𝐶𝑜𝑣(𝜀𝑡−ℎ , 𝜀𝑡−ℎ ) = (𝑡 − ℎ) × 𝑉𝑎𝑟(𝜀𝑡 ) = (𝑡 − ℎ)𝜎𝜀2
• 𝐶𝑜𝑣(𝜀𝑖 , 𝜀𝑗 ) = 0
• 𝐶𝑜𝑣(𝜀𝑖 , 𝜀𝑖 ) = 𝑉𝑎𝑟(𝜀𝑖 ) = 𝜎𝜀2
How to Deal with Non-Stationarity?
1. We can use a variance-stabilizing transformation on the data.
a. Logarithmic
2. Differincing
a. ΔXt = (1 − 𝐿) × 𝑋𝑡 = 𝑋𝑡 − 𝑋𝑡−1
i. 𝐿 – lag operator
1. 𝐿 × 𝑋𝑡 = 𝑋𝑡−1
b. ΔXt = 𝑋𝑡 − 𝑋𝑡−1 = 𝜀𝑡 – random walk, and now it’s become stationary.
i. Example: linear trend 𝑋𝑡 = 𝛽0 + 𝛽1 × 𝑡 + 𝜀𝑡
1. ΔXt = 𝑋𝑡 − 𝑋𝑡−1 = 𝛽0 + 𝛽1 × 𝑡 + 𝜀𝑡 − (𝛽0 + 𝛽1 × (𝑡 − 1) + 𝜀𝑡−1 ) = 𝛽1 + 𝜀𝑡 − 𝜀𝑡−1 = 𝛽1 +
Δ𝜀𝑡
3. Manipulation with lag operator
a. 𝐿 × 𝑋𝑡 = 𝑋𝑡−1
b. 𝐿2 × 𝑋𝑡 = 𝐿 × (𝐿 × 𝑋𝑡 ) = 𝐿 × 𝑋𝑡−1 = 𝑋𝑡−2
c. 𝐿𝑗 × 𝑋𝑡 = 𝑋𝑡−𝑗
d. 𝛥 = (1 − 𝐿)
i. 𝛥 × 𝑋𝑡 = (1 − 𝐿) × 𝑋𝑡 = 1 × 𝑋𝑡 − 𝐿 × 𝑋𝑡 = 𝑋𝑡 − 𝑋𝑡−1
ii. 𝛥2 𝑋𝑡 = 𝛥(𝛥 𝑋𝑡 ) = (1 − 𝐿)(1 − 𝐿)𝑋𝑡 = (1 − 2𝐿 + 𝐿2 )𝑋𝑡 = 𝑋𝑡 − 2𝑋𝑡−1 + 𝑋𝑡−2
e. Seasonal difference
i. Δs Xt = (1 − 𝐿𝑠 ) × 𝑋𝑡 = 𝑋𝑡 − 𝑋𝑡−𝑠
4. Log difference
𝑋𝑡 𝑋𝑡
a. 𝑌𝑡 𝛥 log(𝑋𝑡 ) = log(𝑋𝑡 ) − log(𝑋𝑡−1 ) = log ( ) ≈ ( ) − 1
𝑋𝑡−1 𝑋𝑡−1
E_MFAE_FTSE
,Table of contents
Week 1 ................................................................................................................................................................................................ 3
Week 2 ................................................................................................................................................................................................ 6
Week 3 .............................................................................................................................................................................................. 10
Week 4 .............................................................................................................................................................................................. 13
Week 5 .............................................................................................................................................................................................. 17
Week 6 .............................................................................................................................................................................................. 20
,Week 1
Deterministic – can be determines by past.
However, no phenomena is deterministic, because unknown factors.
Stochastic Process – it’s a mathematical model which explains, not one random event, but a random event, but rather a whole
sequence of random variables {𝑋𝑡 } ordered in time.
{𝑋𝑡 } – This is a mathematical notation for a sequence of random variables indexed in time.
• Realization
o Single Realization – one run of process o Multiple realizations – many runs of the
one path same process, different paths due to
randomness.
o
o
Time Series components:
• Trend
o Long-term/short-term growth.
• Seasonality
o Always fixed and known period.(time of the year, day of the weak)
• Cyclical
o Always due to economic factors, not fixed periods
Time series can be decomposed into its componenents/
• Additive: 𝑋𝑡 = 𝑇𝑡 + 𝑆𝑡 + 𝑅𝑡 – in items.
• Multiplicative: 𝑋𝑡 = 𝑇𝑡 × 𝑆𝑡 × 𝑅𝑡 – percentages.
o 𝑋𝑡 – in time T.
o T – trend cycle component
o 𝑅𝑡 - unpredictable
o S – seasonal
o log 𝑋 = log 𝑇 × 𝑆 × 𝑅 → log 𝑋 = log 𝑇 + log 𝑆 + log 𝑅 – Logarithms are often used to transform multiplicative
models into additive models
Methods of decomposition
• Classical Decomposition
• X-11 Decomposition
• STL Decomposition
Classical Decomposition
• Trend Cycle computed my moving average.
1
o m-MA: 𝑇̂𝑖 = ∙ ∑𝑘𝑗=−𝑘 𝑥𝑡+𝑗 , where 𝑚 = 2𝑘 + 1
𝑚
▪
• Seasonal component: computed by averaging the deviations from the trend-cycle each season
• Remainder Component: the residuals after removing the trend-cycle and seasonal component.
,Stationarity – we say that time series/stochastic process {𝑋𝑡 } with 𝐸(𝑋𝑡2 ) < ∞ does not change over time. Two mandatory
conditions:
1. 𝜇𝑋 (𝑡) = 𝜇𝑋 – the mathematical expectation (mean value) of the process should not depend on time 𝑡.
a. 𝜇𝑋 (𝑡) – average for a certain period 𝑡.
b. 𝜇𝑋 – total average.
2. 𝛾𝑋 (𝑡, 𝑡 − ℎ) = 𝛾𝑋 (ℎ) – the covariance between 𝑡 and 𝑡 − ℎ (more earlier moment) is dependents solely on the size of
the gap.
a. ℎ – lag.
• Weak stationarity implies that the mean, variance and autocovariances do not change over time.
• Weak stationarity restricts the first and second moments... but is silent about higher moments.
o First and second moments – are mean and variance, higher: skewness, kurtosis.
• restricts the unconditional moments... but the conditional moments can vary
Autocorrelation function –is a measure of the correlation between the time series and a lagged version of itself.
For a weakly stationary time series, the ACF at lag h is defined as:
𝐶𝑜𝑣(𝑋𝑡 , 𝑋𝑡−ℎ ) 𝛾𝑋 (ℎ) 𝛾𝑋 (ℎ)
𝜌𝑋 (ℎ) = = =
√𝑉𝑎𝑟(𝑋𝑡 ) × √𝑉𝑎𝑟(𝑋𝑡−ℎ ) √𝛾𝑋 (0) × √𝛾𝑋 (0) 𝛾𝑋 (0)
• 𝛾𝑋 (0) = 𝐶𝑜𝑣(𝑋𝑡 , 𝑋𝑡 ) = 𝑉𝑎𝑟(𝑋𝑡 )
Estimation:
1
• 𝛾̂𝑋 (ℎ) = × ∑𝑇−ℎ ̅ ̅
𝑡=1 (𝑋𝑡 − 𝑋 )(𝑋𝑡+ℎ − 𝑋 )
𝑇
1
• 𝛾̂𝑋 (0) = × ∑𝑇𝑡=1 (𝑋𝑡 − 𝑋̅)2
𝑇
1
• 𝑋̅ = × ∑𝑇𝑡=1 𝑋̅
𝑇
, Simple Time Series Models
• White noise – this is the simplest possible model of a time series. It can be considered an “ideal coincidence”.
o {𝑋𝑡 } ~ 𝑊𝑁(0, 𝜎𝑋2 )
▪ 𝔼[𝑋ₜ] = 0 – On average, the values of the process are zero.
▪ 𝑉𝑎𝑟(𝑋ₜ) = 𝜎² – there are no periods when values become significantly more or less volatile.
• 𝑉𝑎𝑟(𝑍𝑖 ) = 𝔼[(𝑍𝑖 − 0)²] = 𝔼[𝑍𝑖 ²] = 𝜎²
▪ 𝐶𝑜𝑣(𝑋ₜ, 𝑋𝑡−ℎ ) = 0, 𝑓𝑜𝑟 ℎ ≠ 0 – Knowing the current value does not help predict the future.
𝜎 2 𝑖𝑓 ℎ = 0 𝛾 (ℎ) 1 𝑖𝑓 ℎ = 0
o 𝛾𝑋 (ℎ) = { 𝑋 → 𝑝𝑋 (ℎ) = 𝑋 = {
0 𝑖𝑓 ℎ ≠ 0 𝛾𝑋 (0) 0 𝑖𝑓 ℎ ≠ 0
• Random walk – random and independent of the previous one value.
o 𝑋𝑡 = 𝜀1 + 𝜀2 + ⋯ + 𝜀𝑡
▪ {𝜀𝑡 } ~ 𝑊𝑁(0, 𝜎𝑋2 )
▪ 𝑋𝑡 – total affect.
o 𝑋𝑡 = 𝑋𝑡−1 + 𝜀𝑡
▪ 𝑋1 = 𝜀1
▪ 𝐸[𝑋𝑡 ] = 0
• 𝐸[𝑋𝑡 ] = 𝐸[𝜀1 + 𝜀2 + ⋯ + 𝜀𝑡 ] = 𝐸[𝜀1 ] + ⋯ + 𝐸[𝜀𝑡 ] = 0
▪ 𝑉𝑎𝑟(𝑋𝑡 ) = 𝑉𝑎𝑟(𝜀1 + 𝜀2 + ⋯ + 𝜀𝑡 ) = 𝑡 × 𝜎𝜀2
• Variance growth linearly with time t.
o Autocovariance of the random walk is:
▪ 𝛾𝑋 (𝑡, 𝑡 − ℎ) = 𝐶𝑜𝑣(𝑋𝑡 , 𝑋𝑡−ℎ ) = 𝐶𝑜𝑣(𝜀1 + ⋯ + 𝜀𝑡 , 𝜀1 + ⋯ + 𝜀𝑡−ℎ ) = 𝐶𝑜𝑣(𝜀1 , 𝜀1 ) + ⋯ +
𝐶𝑜𝑣(𝜀𝑡−ℎ , 𝜀𝑡−ℎ ) = (𝑡 − ℎ) × 𝑉𝑎𝑟(𝜀𝑡 ) = (𝑡 − ℎ)𝜎𝜀2
• 𝐶𝑜𝑣(𝜀𝑖 , 𝜀𝑗 ) = 0
• 𝐶𝑜𝑣(𝜀𝑖 , 𝜀𝑖 ) = 𝑉𝑎𝑟(𝜀𝑖 ) = 𝜎𝜀2
How to Deal with Non-Stationarity?
1. We can use a variance-stabilizing transformation on the data.
a. Logarithmic
2. Differincing
a. ΔXt = (1 − 𝐿) × 𝑋𝑡 = 𝑋𝑡 − 𝑋𝑡−1
i. 𝐿 – lag operator
1. 𝐿 × 𝑋𝑡 = 𝑋𝑡−1
b. ΔXt = 𝑋𝑡 − 𝑋𝑡−1 = 𝜀𝑡 – random walk, and now it’s become stationary.
i. Example: linear trend 𝑋𝑡 = 𝛽0 + 𝛽1 × 𝑡 + 𝜀𝑡
1. ΔXt = 𝑋𝑡 − 𝑋𝑡−1 = 𝛽0 + 𝛽1 × 𝑡 + 𝜀𝑡 − (𝛽0 + 𝛽1 × (𝑡 − 1) + 𝜀𝑡−1 ) = 𝛽1 + 𝜀𝑡 − 𝜀𝑡−1 = 𝛽1 +
Δ𝜀𝑡
3. Manipulation with lag operator
a. 𝐿 × 𝑋𝑡 = 𝑋𝑡−1
b. 𝐿2 × 𝑋𝑡 = 𝐿 × (𝐿 × 𝑋𝑡 ) = 𝐿 × 𝑋𝑡−1 = 𝑋𝑡−2
c. 𝐿𝑗 × 𝑋𝑡 = 𝑋𝑡−𝑗
d. 𝛥 = (1 − 𝐿)
i. 𝛥 × 𝑋𝑡 = (1 − 𝐿) × 𝑋𝑡 = 1 × 𝑋𝑡 − 𝐿 × 𝑋𝑡 = 𝑋𝑡 − 𝑋𝑡−1
ii. 𝛥2 𝑋𝑡 = 𝛥(𝛥 𝑋𝑡 ) = (1 − 𝐿)(1 − 𝐿)𝑋𝑡 = (1 − 2𝐿 + 𝐿2 )𝑋𝑡 = 𝑋𝑡 − 2𝑋𝑡−1 + 𝑋𝑡−2
e. Seasonal difference
i. Δs Xt = (1 − 𝐿𝑠 ) × 𝑋𝑡 = 𝑋𝑡 − 𝑋𝑡−𝑠
4. Log difference
𝑋𝑡 𝑋𝑡
a. 𝑌𝑡 𝛥 log(𝑋𝑡 ) = log(𝑋𝑡 ) − log(𝑋𝑡−1 ) = log ( ) ≈ ( ) − 1
𝑋𝑡−1 𝑋𝑡−1