16 Additional Topics in Time Series Regression
This chapter discusses the following advanced topics in time series regression and demonstrates how core techniques can be applied using R:
- Vector autoregressions (VARs). We focus on using VARs for forecasting. Another branch of the literature is concerned with so-called Structural VARs which are, however, beyond the scope of this chapter.
- Multiperiod forecasts. This includes a discussion of iterated and direct (multivariate) forecasts.
- The DF-GLS test, a modification of the ADF test that has more power than the latter when the series has deterministic components and is close to being nonstationarity.
- Cointegration analysis with an application to short- and long-term interest rates. We demonstrate how to estimate a vector error correction model.
- Autoregressive conditional heteroskedasticity (ARCH) models. We show how a simple generalized ARCH (GARCH) model can be helpful in quantifying the risk associated with investing in the stock market in terms of estimation and forecasting of the volatility of asset returns.
To reproduce the code examples, install the R packages listed below and make sure that the subsequent code chunk executes without any errors.
- AER (Kleiber & Zeileis, 2018)
- dynlm (Zeileis, 2016)
- fGarch (Wuertz et al., 2017)
- quantmod (Ryan & Ulrich, 2018)
- readxl (Wickham & Bryan, 2018)
- scales (Wickham, 2018)
- vars (Pfaff, 2018)
library(AER) library(readxl) library(dynlm) library(vars) library(quantmod) library(scales) library(fGarch)
Kleiber, C., & Zeileis, A. (2018). AER: Applied Econometrics with R (Version 1.2-6). Retrieved from https://CRAN.R-project.org/package=AER
Zeileis, A. (2016). dynlm: Dynamic Linear Regression (Version 0.3-5). Retrieved from https://CRAN.R-project.org/package=dynlm
Wuertz, D., Setz, T., Chalabi, Y., Boudt, C., Chausse, P., & Miklovac, M. (2017). fGarch: Rmetrics - Autoregressive Conditional Heteroskedastic Modelling (Version 3042.83). Retrieved from https://CRAN.R-project.org/package=fGarch
Ryan, J. A., & Ulrich, J. M. (2018). quantmod: Quantitative Financial Modelling Framework (Version 0.4-13). Retrieved from https://CRAN.R-project.org/package=quantmod
Wickham, H., & Bryan, J. (2018). readxl: Read Excel Files (Version 1.2.0). Retrieved from https://CRAN.R-project.org/package=readxl
Wickham, H. (2018). scales: Scale Functions for Visualization (Version 1.0.0). Retrieved from https://CRAN.R-project.org/package=scales
Pfaff, B. (2018). vars: VAR Modelling (Version 1.5-3). Retrieved from https://CRAN.R-project.org/package=vars