Case ST: Stochastic Trend Modeling – Forecasting GDP_Real
Data:
GDP: Gross Domestic Product in billions of dollars
Seasonally Adjusted Annual Rate, Quarterly
Range: 1947:1 to 2004: 4
GDPDEF: GDP: Implicit Price Deflator, Index 2000=100
Seasonally Adjusted, Quarterly
Range: 1947:1 to 2004:4
GDP_Real = GDP / GDPDEF
Variable for Modeling: Y = ln(GDP_Real)
1. Characteristics of DYt = Yt - Y(t-1) (Names as DLOG_GDP in the displays)
Included observations: 223
Autocorrelation / Partial Correlation / AC / PAC / Q-Stat / Prob
.|*** | / .|*** | / 1 / 0.333 / 0.333 / 25.124 / 0.000
.|* | / .|* | / 2 / 0.184 / 0.082 / 32.783 / 0.000
.|. | / *|. | / 3 / -0.021 / -0.118 / 32.880 / 0.000
*|. | / *|. | / 4 / -0.118 / -0.108 / 36.062 / 0.000
*|. | / *|. | / 5 / -0.164 / -0.087 / 42.286 / 0.000
*|. | / .|. | / 6 / -0.090 / 0.018 / 44.170 / 0.000
*|. | / .|. | / 7 / -0.071 / -0.026 / 45.330 / 0.000
.|. | / .|. | / 8 / -0.035 / -0.027 / 45.615 / 0.000
.|. | / .|. | / 9 / 0.055 / 0.065 / 46.331 / 0.000
.|* | / .|. | / 10 / 0.068 / 0.023 / 47.436 / 0.000
.|. | / .|. | / 11 / 0.025 / -0.040 / 47.590 / 0.000
*|. | / **|. | / 12 / -0.141 / -0.190 / 52.288 / 0.000
3. Modeling DYt
Sample (adjusted): 1947:3 2002:4
Included observations: 222 after adjustments
Convergence achieved after 3 iterations
Variable / Coefficient / Std. Error / t-Statistic / Prob.
C / 0.008410 / 0.000964 / 8.720208 / 0.0000
AR(1) / 0.334027 / 0.063479 / 5.261996 / 0.0000
R-squared / 0.111788 / Mean dependent var / 0.008404
Adjusted R-squared / 0.107751 / S.D. dependent var / 0.010131
S.E. of regression / 0.009570 / Akaike info criterion / -6.451398
Sum squared resid / 0.020149 / Schwarz criterion / -6.420743
Log likelihood / 718.1052 / F-statistic / 27.68860
Durbin-Watson stat / 2.056639 / Prob(F-statistic) / 0.000000
Inverted AR Roots / .33
4. Forecasting Equation
GDP_Realt = exp(log_gdpt)
log_gdpt = log_gdp(t-1) + Dlog(gdp_real)t
Dlog(gdp_real)t – 0.00841= 0.334 (Dlog(gdp_real)t-1 – 0.00841) + et
SE = 0.00957
5. Forecast for h=1
Information set, W
obs / GDP / LOG_GDP / DLOG_GDP2001:1 / 10021.50 / 9.197816 / -0.001235
2001:2 / 10128.90 / 9.200878 / 0.003062
2001:3 / 10135.10 / 9.197361 / -0.003516
2001:4 / 10226.30 / 9.201307 / 0.003945
2002:1 / 10338.20 / 9.209683 / 0.008376
2002:2 / 10445.70 / 9.215581 / 0.005898
2002:3 / 10546.50 / 9.221995 / 0.006414
2002:4 / 10617.50 / 9.223833 / 0.001839
GDP_Real(h=1)=exp(log_gdp(h=1))
log_gdp(h=1) = log_gdp(h=0) + Dlog(gdp_real)(h=1)
log_gdp(h=0)=log_gdp(T=2002.4) =9.223833
pred_Dlog(gdp_real)(h=1|T=2002:4) = 0.00841+0.334 x (0.001839 – 0.00841)
= 0.006215
pred_log_gdp (h=1|T=2002.4) = 9.223833+0.006215 = 9.230048
pred_gdp (h=1|T=2002.4) = exp(9.230048) = 10,199
RMSE = abs(10184.5 – 10199) = 14.5.
95% UL = exp (9.230048+1.96*0.00957) = 10392
95% LL = exp (9.230048 -1.96*0.00957) = 10009.5
This interval contains the real value.
6..Point Forecast for h=2
log_gdp(h=2) = log_gdp(h=1) + Dlog(gdp_real)(h=2)
= log_gdp(h=0)+ Dlog(gdp_real)(h=1)+ Dlog(gdp_real)(h=2)
log_gdp(h=0)=log_gdp(T=2002:4) = 9.223833 from W
pred_Dlog(gdp_real)(h=1|T) = 0.006215 from 5.
Dlog(gdp_real)(h=2) = 0.00841 + 0.334 (Dlog(gdp_real)h=1 – 0.00841) + et
pred_Dlog_gdp(h=2) = 0.00841+0.334 x (pred_Dlog_gdp(h=1) – 0.00841)
= 0.00841+0.334 x (0.006215-0.00841) = 0.00767687
pred_log_gdp(h=2)=9.223833+0.006215+0.00767687 = 9.237725
pred_gdp(h=2|T) = exp(9.237725) = 10,277.6
RMSE = abs(10287.43 – 10277.6) = 9.83
RMSE(h=1,2) = .
7.Forecast for h=1,2,…,8 by Using Eviews
A. RMSE for Point Forecast
smpl @all
delete s1 s2
sample s1 @first 2002:4
sample s2 2003:1 2004:4
series y=log(gdp_real)
smpl s1
equation eq1.ls dlog(gdp_real) c ar(1)
smpl s2
show eq1.forecast(e) gdp_f
group g1 gdp_real gdp_f
scalar rmse=@sqrt(@sumsq(gdp_real-gdp_f)/@obs(gdp_f))
Forecast Results
obs / GDP_REAL / GDP_F2003:1 / 10184.45 / 10199.04
2003:2 / 10287.43 / 10277.64
2003:3 / 10472.83 / 10361.90
2003:4 / 10580.72 / 10448.56
2004:1 / 10697.46 / 10536.51
2004:2 / 10784.69 / 10625.41
2004:3 / 10891.12 / 10715.11
2004:4 / 10994.32 / 10805.60
Forecast: GDP_F
Actual: GDP_REAL
Forecast sample: 2003:1 2004:4
Included observations: 8
Root Mean Squared Error / 135.9925
Mean Absolute Error / 119.0543
Mean Absolute Percentage Error / 1.107603
Theil Inequality Coefficient / 0.006441
Bias Proportion / 0.720193
Variance Proportion / 0.245408
Covariance Proportion / 0.034398
B. Interval Forecast
smpl @all
delete s1 s2
sample s1 @first 2002:4
sample s2 2003:1 2004:4
series y=log(gdp_real)
smpl s1
equation eq1.ls dlog(gdp_real) c ar(1)
smpl s2
'Computes the out-of-sample point forecasts for gdp_real and RMSE
eq1.forecast(e) gdp_f
group g1 gdp_real gdp_f
scalar rmse=@sqrt(@sumsq(gdp_real-gdp_f)/@obs(gdp_f))
show rmse
'
'Computes the out-of-sample intreval forecasts
smpl s1
equation eq2.ls d(y) c ar(1)
smpl s2
eq2.forecast(e) yf1 se_yf1
series u=yf1+1.96*se_yf1
series l=yf1-1.96*se_yf1
series gdp_u=exp(u)
series gdp_l=exp(l)
group g2 gdp_real gdp_f gdp_u gdp_l
show g2.line
6