Skip to main content

14. Overview of Time Series Forecasting

Verified Environments & Platforms:Academic FreeResearcher ProInstitutional VIP

This practical how-to guide presents the theoretical foundations, structural mathematical equations, detailed breakdown of 3 specialized lessons, and multi-platform replication workflows for 14. Overview of Time Series Forecasting from the textbook Econometrics: Theory and Practice, with direct cross-references to the authoritative source material at https://sachktl.tnsai.vn/vi/dsask19u1/c14/.

Econometrics: Theory and Practice14. Overview of Time Series ForecastingTime Series Econometrics, Cointegration, and Financial Volatility · 3 Detailed LessonStata 18 MPR 4.xPython 3.11+TNSAI Ecosystem

1. Methodological Foundations, Mathematical Specification, and Identification​

Giới thiệu tổng quan về dự báo chuỗi thời gian Dự báo là một trong những ứng dụng quan trọng và hấp dẫn nhất của kinh tế lượng, đóng vai trò cốt lõi trong việc ra quyết định của các doanh nghiệp, nhà hoạch định chính sách và các nhà nghiên cứu. Từ việc dự đoán tăng trưởng GDP, lạm phát, giá cổ phiếu cho đến ước tính nhu cầu sản phẩm trong tương lai, khả năng tiên lượng các giá trị tương lai dựa trên dữ liệu quá khứ là một kỹ năng vô giá.

1.1. Structural Equations and Representative Estimator​

Φ(L)(1−L)dYt=μ+Θ(L)εt,εt∣Ft−1∼N(0,σt2)[1]\Phi(L)(1 - L)^d Y_t = \mu + \Theta(L)\varepsilon_t, \quad \varepsilon_t \mid \mathcal{F}_{t-1} \sim \mathcal{N}(0, \sigma_t^2) \tag*{[1]} σt2=ω+∑i=1pαiεt−i2+∑j=1qβjσt−j2,ω>0,  αi,βj≥0[2]\sigma_t^2 = \omega + \sum_{i=1}^p \alpha_i \varepsilon_{t-i}^2 + \sum_{j=1}^q \beta_j \sigma_{t-j}^2, \quad \omega > 0, \; \alpha_i, \beta_j \ge 0 \tag*{[2]}

1.2. Core Identification Assumptions and Applicability Conditions​

  1. Time series processes must satisfy covariance stationarity or be differenced to their appropriate order of integration I(d)I(d) prior to estimation.
  2. Roots of the autoregressive Φ(L)\Phi(L) and moving-average Θ(L)\Theta(L) lag polynomials must lie strictly outside the complex unit circle.
  3. In conditional volatility GARCH specifications, the persistence condition ∑αi+∑βj<1\sum \alpha_i + \sum \beta_j < 1 ensures finite unconditional variance.
Methodological Scope Boundary:Regressing nonstationary levels without unit-root and Johansen cointegration testing induces spurious regression with inflated $t$-statistics and $R^2$.

2. Lesson-by-Lesson Academic Breakdown​

2.1. Nền tảng dự báo chuỗi thời gian và mô hình đơn biến​

Trong bài học giới thiệu, chúng ta đã có cái nhìn tổng quan về tầm quan trọng của dự báo và lộ trình học tập của toàn bộ chuỗi bài viết. Bài học đầu tiên này sẽ đặt những viên gạch nền móng vững chắc nhất, giúp bạn hiểu rõ các khái niệm cốt lõi và làm quen với phương pháp dự báo đơn giản nhưng hiệu quả nhất: mô hình tự hồi quy. Chúng ta sẽ bắt đầu bằng việc phân biệt các loại dự báo, tìm hiểu về sai số dự báo, và sau đó đi sâu vào kỹ thuật làm mịn số mũ đơn giản.

Key Methodological Sub-Topics Covered in This Lesson:

  • Nền tảng lý thuyết

  • 1. Các khái niệm cơ bản trong dự báo

  • 2. Làm mịn số mũ đơn giản: Một phương pháp khởi đầu

  • Phương pháp nghiên cứu: Dự báo với mô hình đơn biến AR

  • 1. Xây dựng dự báo từ hàm trung bình có điều kiện

  • 2. Đánh giá độ không chắc chắn: Phương sai sai số dự báo

  • Analytical Environments: Stata 18 MP, R 4.x, Python 3.11+ · Authoritative Source: Read Full Original Lesson on SachKTL

2.2. Các mô hình dự báo nâng cao: ARMA, VAR và GARCH​

Ở bài học trước, chúng ta đã xây dựng một nền tảng vững chắc về dự báo chuỗi thời gian thông qua mô hình tự hồi quy. Mô hình AR rất hữu ích, nhưng nó giả định rằng cấu trúc động của một chuỗi chỉ phụ thuộc vào các giá trị quá khứ của chính nó. Tuy nhiên, trong thực tế, nhiều chuỗi thời gian kinh tế lại có cấu trúc phức tạp hơn, bị ảnh hưởng bởi cả các cú sốc ngẫu nhiên trong quá khứ hoặc bởi sự biến động của các chuỗi thời gian khác . Bài học này sẽ mở rộng bộ công cụ phân tích của chúng ta bằng cách giới thiệu ba lớp mô hình nâng cao.

Key Methodological Sub-Topics Covered in This Lesson:

  • Nền tảng lý thuyết

  • 1. Dự báo với các quá trình tuyến tính tổng quát

  • 1.1. Trường hợp đặc biệt: Quá trình Trung bình trượt MA

  • 1.2. Kết hợp AR và MA: Mô hình ARMA

  • 2. Dự báo đa biến với mô hình véc-tơ tự hồi quy

  • 3. Dự báo sự biến động với mô hình GARCH

  • Analytical Environments: Stata 18 MP, R 4.x, Python 3.11+ · Authoritative Source: Read Full Original Lesson on SachKTL

2.3. Hướng dẫn thực hành dự báo chuỗi thời gian với Stata​

Sau khi trang bị những kiến thức lý thuyết nền tảng về các mô hình dự báo đơn biến ở Bài 1 và khám phá các phương pháp nâng cao như ARMA, VAR, GARCH ở Bài 2, giờ là lúc chúng ta tổng hợp tất cả lại trong một bài thực hành toàn diện. Lý thuyết sẽ trở nên vô nghĩa nếu không thể áp dụng vào việc giải quyết các vấn đề thực tế. Bài học cuối cùng này sẽ đóng vai trò như một cây cầu nối liền giữa lý thuyết và thực hành, hướng dẫn bạn từng bước thực hiện một dự án dự báo chuỗi thời gian hoàn chỉnh bằng Stata.

Key Methodological Sub-Topics Covered in This Lesson:

  • Dữ liệu và bối cảnh nghiên cứu

  • Hướng dẫn từng bước từ A-Z

  • Quy trình thực hiện dự báo

  • Phân tích chuyên sâu và so sánh kết quả

  • Diễn giải kết quả

  • Mẹo và lưu ý khi thực hành

  • Analytical Environments: Stata 18 MP · Authoritative Source: Read Full Original Lesson on SachKTL

3. Step-by-Step Empirical Implementation Workflow​

1. Formulate the Research Question and Prepare Data on EcoData & Finco

Define the dependent variable, core explanatory variables, and control covariates aligned with 14. Overview of Time Series Forecasting. Extract standardized Vietnamese empirical series from EcoData or Finco, and screen for missing observations and extreme outliers.

2. Conduct Descriptive Profiling, Correlation Analysis, and Pre-Estimation Checks

Examine empirical distributions, construct summary statistics tables, and evaluate collinearity using pairwise correlation matrices and Variance Inflation Factors (VIF).

3. Estimate the Model Across Stata 18 MP, R 4.x, and Python 3.11+

Execute the parameter estimation scripts matching the structural equations in Section 1.1 while cross-checking theoretical derivations at SachKTL.

4. Perform Post-Estimation Diagnostics and Robust Variance Correction

Test for heteroskedasticity, serial correlation, Ramsey RESET functional form misspecification, and regressor endogeneity. Apply White HC1 or cluster-robust standard errors for valid inference.

5. Format Journal-Grade Tables and Cross-Verify on EcoLab

Report point estimates, standard errors in parentheses, and statistical significance stars following APA 7th / AER Booktabs standards, or automate the entire reporting pipeline on EcoLab and VietLOD.

4. Multi-Platform Implementation Scripts in Stata, R, and Python​

* Thiết lập chuỗi thời gian, kiểm định nghiệm đơn vị và ước lượng ARIMA / GARCH
version 18.0
clear all
set more off
import delimited "sachktl_timeseries_finco.csv", clear encoding("utf-8")

tsset time_id
dfuller y, lags(4) trend regress
pperron y, lags(4) trend

* 1. Ước lượng mô hình ARIMA và kiểm định nhiễu trắng phần dư
arima y, arima(1,1,1) vce(robust)
predict resid_arima, resid
wntestq resid_arima, lags(12)

* 2. Ước lượng mô hình phương sai có điều kiện thay đổi ARCH/GARCH(1,1)
arch d.y x1 x2, arch(1) garch(1) vce(robust)

5. Post-Estimation Diagnostic and Interpretation Guide​

Diagnostic CriterionNull Hypothesis H0H_0Benchmark ThresholdCorrective Action When H0H_0 Is Rejected
HeteroskedasticityConstant error variance Var(εi)=σ2\text{Var}(\varepsilon_i) = \sigma^2p-value<0.05p\text{-value} < 0.05 rejects H0H_0Apply vce(robust), vcovHC(HC1), or FGLS/WLS weighted estimation
MulticollinearityNo severe linear dependence among regressorsVIF<10\text{VIF} < 10 acceptableDrop redundant covariates, center interactions, or apply LASSO/Ridge regularization
Ramsey RESET Functional FormNo omitted nonlinear or higher-order termsp-value>0.05p\text{-value} > 0.05 retains H0H_0Add interaction terms, quadratic polynomials, or log-transform skewed positive variables
Regressor ExogeneityOrthogonality Cov(X,ε)=0\text{Cov}(X, \varepsilon)=0Durbin-Wu-Hausman p>0.05p > 0.05Transition to IV/2SLS, LIML, or GMM estimation with validated instruments

6. Video Tutorial Walkthrough​

Video Tutorial: Practical Walkthrough for 14. Overview of Time Series Forecasting on SachKTL
Lesson CodeLesson TitleSupported SoftwareOriginal Source Link on SachKTL
14.1Nền tảng dự báo chuỗi thời gian và mô hình đơn biếnStata 18 MP, R 4.x, Python 3.11+Open Original Lesson on SachKTL
14.2Các mô hình dự báo nâng cao: ARMA, VAR và GARCHStata 18 MP, R 4.x, Python 3.11+Open Original Lesson on SachKTL
14.3Hướng dẫn thực hành dự báo chuỗi thời gian với StataStata 18 MPOpen Original Lesson on SachKTL