ECON 3350/7350: Applied Econometrics for Macroeconomics and Finance
Tutorial 3: Univariate Time Series – II
The point of this question is to suggest a general “road map” for analyzing univariate time series with ARMA models.
1. The file Merck.csv contains daily data of stock prices of Merck & Co., Inc. (MRK) during 2001-2013. In what follows, we use yt to denote the adjusted closing prices (adjclose in the data) in time t.
(a) LoadthedatatoStata,generateadatevariable,declarethedataastimeseries, and keep only observations during January 1, 2011 – January 31, 2012.
(b) Construct the following variables:
• Changes in prices: ∆yt = yt − yt−1
• Log returns: rt = log(yt/yt−1)
(c) Draw time series plots of yt and ∆yt and comment on their stationarity1.
(d) Compute and plot (using either ac/pac or corrgram) ACF and PACF of yt and ∆yt. Comment on your findings.
(e) Based on the ACF and PACF of ∆yt you obtained in (d), propose and estimate at least three ARMA(p, q) models for ∆yt.
(f) Use AIC and BIC to select an ARMA(p, q) model. Estimate the AR and MA parameters of this model and report estimation results.
(g) Draw a time series plot of the residuals you obtain via estimating the ARMA model selected in (f). Comment on your findings. Run the Ljung-Box test (at significance level α = 5%) for the white noises hypothesis and report test results. Note that you will need to adjust the degree(s) of freedom as you are analyzing estimation residuals.
(h) Forecast MRK stock prices in January, 2012. Compare your predicted prices with real prices in the data.
(i) Repeat (c) – (h) for the log returns rt. Note that here you forecast the daily returns (yt − yt−1)/yt−1 in January, 2012. Hint: Recall that (yt − yt−1)/yt−1 ≈ rt.
1You should use only 2011 data for parts (c)-(g). 1
Solution: See the do-file tutorial3.do. (a) Just take a look at the do-file.
(b) The same as Part (a).
(c) It seems from the time series plot that {yt} is not likely to be station- ary as its mean is time-varying. For {∆yt}, the time series plot provides evidence for a constant (≈ 0) mean. However, we can observe the phe- nomenon called volatility clustering, i.e., large price changes (absolute re- turns) often occur in clusters, which is one of the stylized features com- mon in financial data. This phenomenon provides evidence that the vari- ance of ∆yt may depend on t. We will study models capturing stochastic volatility in the future. For now, we just ignore this issue for simplicity.
(d) For {yt}, ρ1 ≈ 1 and ρk decays very slowly as k increases, and the PACF has only 1 peak whose value is approximately 1. This pattern of ACF and PACF implies that {yt} may have unit root, i.e., yt ∼ AR(1) with a1 ≈ 1. We know that the sufficient and necessary condition for an AR(1) model to be stationary is |a1| < 1. Thus, we doubt that {yt} is not a stationary process, which is consistent with the intuition we got from the time series plot in Part (a). We will learn how to handle unit root in the future, too. Before that, enjoy stationarity for a while. For {∆yt}, we can observe a couple of significant (but small) ACF and PACF for comparatively large k (order of lags). There are no clear cut-off points for either ACF or PACF, which suggests that an ARMA process rather than either AR or MA is more suitable for modeling {∆yt}.
(e) Followingtheparsimonyprinciple,wetryARMAmodelswithorder(1,1), (1, 2), (2, 1), (2, 2) and compute their AIC/BIC. See and run the do-file.
(f) We pick ARMA(1, 1) as it has the smallest BIC and very similar AIC as ARMA(1, 2). The estimated model is
∆yt = 0.0104 − 0.9083∆yt−1 + 0.8413εt−1 (0.0233) (0.0887) (0.1059)
(g) Though we can detect volatility clustering (not surprising at all as we ig- nore this intentionally), the process {εt} of residuals seems to have zero mean. We run Ljung-Box tests for k = 3, ..., 10. For each k, the Q-statistic (degree of freedom = k − 2 here) turns out to be smaller than the cor- responding critical value. Hence, we cannot reject the H0 that {εt} is a white noise process.
(h) See and run the do-file. For forecasting purpose, the ARMA(1, 1) model we fit in Part (f) performs adequately well.
(i) All results here are very similar to what we have for {∆y } unless r
t t+h
has weak predictive ability for rt+h.
2