Programming lesson
Understanding Autocovariance and Lag Polynomials in Econometrics: A Spring 2025 Homework Guide
Master key econometrics concepts like autocovariance, AR(1) processes, and lag polynomials with this tutorial tailored to Spring 2025 homework. Includes step-by-step explanations and timely examples.
Introduction to Autocovariance and Lag Polynomials
Econometrics II often challenges students with time series analysis, especially when dealing with autocovariance and lag polynomials. This tutorial breaks down core concepts from a typical Spring 2025 homework assignment, helping you understand the theory behind the calculations. We'll explore autocovariances for moving average processes, variances for autoregressive models, and lag polynomial operations—all essential for your econometrics toolkit.
1. Autocovariances for a Moving Average Process
Consider the process: x_t = α₀ + 5u_t + u_{t-1}, where u_t is white noise with variance σ². The autocovariance function γ(h) = Cov(x_t, x_{t+h}) measures linear dependence between observations separated by lag h. Since u_t is white noise, Cov(u_t, u_s) = 0 for t ≠ s. For h = 0, variance: γ(0) = Var(5u_t + u_{t-1}) = 25σ² + σ² = 26σ². For h = 1: γ(1) = Cov(5u_t + u_{t-1}, 5u_{t+1} + u_t) = 5σ² (only u_t terms overlap). For h ≥ 2, γ(h) = 0. This pattern is typical for an MA(1) process—autocovariances cut off after lag 1.
2. Variance and Autocovariances for an AR(1) Process
For the stationary AR(1) process x_t = 3 + 0.5x_{t-1} + u_t with E[u_t²] = 3, the variance is constant. Taking variance of both sides: γ(0) = 0.5²γ(0) + 3 → γ(0) = 3 / (1 - 0.25) = 4. Autocovariances follow γ(h) = 0.5^h γ(0). So γ(1) = 2, γ(2) = 1, γ(3) = 0.5. Autocorrelations ρ(h) = γ(h)/γ(0) = 0.5^h: ρ(1)=0.5, ρ(2)=0.25, ρ(3)=0.125. This geometric decay is a hallmark of AR(1) processes, similar to how viral trends fade over time—like a TikTok meme's popularity halving each week.
3. Variance Matrix for an AR(1) Process
Consider e_t = a e_{t-1} + u_t with a = 0.5 and E = (e₁, e₂, e₃). Two cases arise:
a) Fixed e₀
If e₀ is fixed (non-stochastic), then e₁ = a e₀ + u₁, e₂ = a² e₀ + a u₁ + u₂, e₃ = a³ e₀ + a² u₁ + a u₂ + u₃. Since u_t are i.i.d. with variance σ², the variance matrix Ω = var(E) has diagonal elements: Var(e₁)=σ², Var(e₂)=(a²+1)σ², Var(e₃)=(a⁴+a²+1)σ². Off-diagonals: Cov(e₁,e₂)=aσ², Cov(e₁,e₃)=a²σ², Cov(e₂,e₃)=a(1+a²)σ². This matrix is not Toeplitz because variances differ—the process is not stationary due to the fixed start.
b) Stationary Case
If the process is stationary (started in the infinite past), Var(e_t) = σ²/(1-a²) = 4 (with σ²=3). All diagonal elements are 4. Covariances: Cov(e_t, e_{t+h}) = a^h σ²/(1-a²) = 4×0.5^h. So Ω is a Toeplitz matrix with constant diagonal and decaying off-diagonals. For h=1, covariance = 2; h=2, covariance = 1. This symmetric, constant-variance structure is typical for stationary AR(1) models used in finance, like modeling daily stock returns where volatility clusters but variance remains constant over long horizons.
4. Operations with Lag Polynomials
Lag polynomials like a(L) = a₀ + a₁L and b(L) = b₀ + b₁L + b₂L² are tools to represent dynamic relationships. Given a₀=1, a₁=-2, b₀=3, b₁=-0.3, b₂=0.5:
i) Applying Lag Polynomials to a Series
For x_t values: x_t=3, x_{t-1}=-3, x_{t-2}=-2, x_{t-3}=9, x_{t-4}=9. Then a(L)x_t = a₀ x_t + a₁ x_{t-1} = 1×3 + (-2)×(-3) = 3 + 6 = 9. Similarly, b(L)x_t = b₀ x_t + b₁ x_{t-1} + b₂ x_{t-2} = 3×3 + (-0.3)×(-3) + 0.5×(-2) = 9 + 0.9 - 1 = 8.9. These numbers represent filtered values, akin to smoothing a time series in signal processing.
ii) Roots of Lag Polynomials
To find roots of a(L), set 1 - 2L = 0 → L = 0.5. For b(L), solve 3 - 0.3L + 0.5L² = 0. Using quadratic formula: L = [0.3 ± sqrt(0.09 - 6)] / (2×0.5) = [0.3 ± sqrt(-5.91)] / 1, which are complex: 0.15 ± 1.215i. Complex roots indicate cyclical behavior, common in macroeconomic data like GDP growth.
iii) Product of Lag Polynomials
c(L) = a(L)b(L) = (1 - 2L)(3 - 0.3L + 0.5L²) = 3 - 0.3L + 0.5L² - 6L + 0.6L² - L³ = 3 - 6.3L + 1.1L² - L³. Roots of c(L) are the union of roots of a(L) and b(L): L=0.5 and the two complex roots. This is useful for understanding the combined dynamics of two filters.
iv) Inverse of a Lag Polynomial
To find coefficients of b⁻¹(L), we need d(L) such that b(L)d(L)=1. Write d(L) = d₀ + d₁L + d₂L² + .... Multiply: (3 - 0.3L + 0.5L²)(d₀ + d₁L + d₂L² + ...) = 1. Equate coefficients: constant: 3d₀ = 1 → d₀ = 1/3. L term: 3d₁ - 0.3d₀ = 0 → d₁ = 0.1/3 = 1/30. L² term: 3d₂ - 0.3d₁ + 0.5d₀ = 0 → 3d₂ = 0.3×(1/30) - 0.5×(1/3) = 0.01 - 0.1667 = -0.1567 → d₂ ≈ -0.0522. So b⁻¹(L) ≈ 0.3333 + 0.0333L - 0.0522L² + .... This infinite series converges if roots are outside the unit circle (here complex roots have modulus ≈1.22 >1, so invertible). Inverse lag polynomials are used to compute impulse response functions in VAR models.
5. Computer Question: Autocorrelation Testing in MATLAB
Using MATLAB to regress consumption growth on income growth and interest rate, you obtain residuals e_t. To test for autocorrelation, regress e_t on e_{t-1}: e_t = ρ e_{t-1} + v_t. The t-test on ρ checks significance. If ρ is significantly different from zero, autocorrelation exists. This is similar to checking whether yesterday's surprise in consumption predicts today's—like a viral tweet's engagement predicting next day's activity. In practice, use regress or fitlm in MATLAB. For the dataset from prior homeworks, you might find ρ around 0.2 with a t-statistic of 2.1, suggesting mild autocorrelation at the 5% level. Remember to include a constant in the regression to avoid omitted variable bias.
Conclusion
Understanding autocovariance and lag polynomials is crucial for time series econometrics. By mastering these concepts, you can analyze economic data more effectively—whether it's GDP growth, stock returns, or consumption patterns. Practice with different parameter values and always check stationarity conditions. For more econometrics guides, stay tuned to Assignment Chef.