$34.99
Please submit one homework assignment per group. The homework solution should be submitted online to Canvas. Please indicate clearly the names of all group members. I prefer that solutions are typed in Latex, but it is also fine to submit scanned copies of handwritten solutions. Include the commented code in an appendix section. Please also submit the executable and commented code.
Theoretical Questions
Question 1 Time Series
The top left panel shows a simulation of an ARIMA(p,d,q) process yt. The panel below shows the implied series for ∆yt and the bottom left panel shows ∆2yt. The middle columns are the corresponding autocorrelation functions and the right columns shows the partial autocorrelations. (The partial autocorrelations are the regression coefficients of yt on its past values.)
Based on the presented information, what is your best guess for the values of p,d and q? What are the likely signs of any AR and MA parameters? Explain your answer.
.........
Question 2 Time Series and GMM
Suppose {Yt : −1 ≤ t ≤ T} is an observed strictly stationary time series generated by the AR(1) model
where |φ0| ∈ (0,1) and 1). It can be shown that
!
and
Let Xt = (Yt,Yt−1,Yt−2)0 and define the functions:
h1(Xt,φ) = Yt−1(Yt − φYt−1) h2(Xt,φ) = Yt−2(Yt − φYt−1) h(Xt,φ) = [h1(Xt,φ),h2(Xt,φ)]0.
1. Show that Φ1 = Φ2 = Φ = {φ0}, where
Φ1 = {φ : E[h1(Xt,φ)] = 0} Φ2 = {φ : E[h2(Xt,φ)] = 0} Φ = {φ : E[h(Xt,φ)] = 0} 2. For k ∈ {1,2}, let
.
It can be shown that
where ω12 is some function of φ0. Verify this claim and express ω12 in terms of φ0.
3. It can be shown that
where ω22 is some function of φ0. Verify this claim and express ω22 in terms of φ0. Is ω12 = ω22? If “yes”, are φˆ1 and φˆ2 asymptotically equivalent? If “no”, can φˆ1 and φˆ2 be ranked in terms of asymptotic efficiency (A consistent estimator is more efficient than another consistent estimator if it has a smaller asymptotic variance)?
4. Let
φˆW = argminφgT (φ)>WgT (φ), gT (φ) = [gT,1(φ),gT,2(φ)]0
where W is a (non-zero) symmetric, positive semi-definite 2 × 2 matrix.
Give conditions (on W and/or {Yt}) under which gT (φˆW ) = 0.
5. It can be shown that if
,
then
where ωW2 is some function of φ0. Verify this claim and express ωW2 in terms of φ0.
6. Find W∗, a value of W for which ωW2 is minimal, and propose a feasible estimator φˆ (i.e. an estimator φˆ that can be computed without knowledge of φ0) satisfying
.........
Empirical Questions
The data that you need for this exercise is in the homework folder on Canvas.
Question 3 ARIMA
1. Obtain the time plot of the oil prices and its first differenced series.
2. Based on the plots, is the first differenced series weakly stationary? Why?
3. Use the ADF test to test for non-stationarity in the oil prices and its first differenced series.
Report your results.
(Hint: You can use statsmodels.tsa.stattools.adfuller(x))
4. Plot the ACF and PACF functions for the oil price and the differenced series. Draw your conclusion.
(Hint: You can use smt.graphics.plot_acf(x, lags=40, alpha=0.05) and smt.graphics.plot_pacf(x, lags=40, alpha=0.05))
5. Let rt be the first differenced price series. Test H0 : ρ1 = ··· = ρ12 = 0 versus H1: ρi = 06 for some 1 ≤ i ≤ 12. Draw your conclusion.
(Hint: You can use statsmodels.stats.diagnostic.acorr_ljungbox(x, lags=12, boxpierce=False))
6. Build an AR model for rt, including model checking. (Hint: Use the PACF to determine the order of the AR(p) process. ) Refine the model by excluding all estimates with t-ratio less than 1.645. (Hint: the t-ratio is the ratio of the estimate divided by the standard error.) Write down the fitted model. (Hint: You can use
model = statsmodels.tsa.arima_model.ARIMA(x, order=(6,0,0)) model_fit = model.fit(disp=0) print(model_fit.summary())
7. Build an ARIMA model for rt, including model checking. Write down the fitted model. (Hint: an ARMA(1,6) might be a good choice and which can be fitted with the command
mod = sm.tsa.statespace.SARIMAX(dx, trend=’c’, order=(1,0,6)) res = mod.fit(disp=False) print(res.summary())
(Hint: You can use
predict = res.get_prediction(start=361, end=364) predict_val = predict.predicted_mean predict_ci = predict.conf_int()
.........
Question 4 GARCH
You can use the statsmodels and arch packages (Import these packages with import statsmodels and import arch.)
1. Is the expected value of rt zero? Why?
2. Are there any serial correlations in rt? Why? (Hint: use ACF and PACF plots.)
3. Fit a Gaussian ARMA-GARCH model to the rt series. Obtain the normal QQ-plot of the standardized residuals, and write down the fitted model. Plot the ACF of the standardized and squared standardized residuals. Is the model adequate? (Hint: You can use statsmodels.api.qqplot(x) for QQ-plot and and
am = arch.arch_model(y, vol=‘Garch’, p=p, q=q) am_fit = am.fit() print(am_fit.summary()) for GARCH(p,q) model)
4. Build an ARMA-GARCH model with Student-t innovations for the r − t series. Perform model checking, including the QQ-plot. Plot the ACF of the standardized and squared standardized residuals. Is the model adequate?
(Hint: You can use arch_model(res, p=p, q=q, dist=‘StudentsT’) for the Student-t innovations)
5. Write down the fitted model.
6. Obtain 1-step to 5-step ahead mean and volatility forecasts using the fitted ARMA-GARCH model with Student-t innovations. Report the numerical values and the plots for your forecast.
Comment on the statement: “Returns are not predictable (for short horizons)”.
(Hint: You can use am_fit.forecast(horizon=5) for 1-step to 5-step forecasts)
.........