0
$\begingroup$

I want to forecast a differenced time series of an Index using the combined ARMA-GARCH model (because I want to forecast the mean and not the variance). My model is a ARMA(2,2)-GARCH(1,1) model. So the equations for the first forecast are:

Y(t+1)=Y(t)+Alpha(1)*(Y(t)-Y(t-1))+Alpha(2)*(Y(t-1)-Y(t-2)) - Beta(1)*e(t) - Beta(2)*e(t-1) + e(t+1)

with

e(t+1) = Sigma(t+1)*Z(t+1)  ,   Z(t+1)=N(0,1) 

and

Sigma^2 (t+1) = Omega + a(1)*u^2(t) + b(1)*Sigma^2(t) 

I tried it with the "rugarch" package and the ugarchforecast method:

GARCHspec <- ugarchspec( variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE))

GARCHfit <- ugarchfit(GARCHspec, diffclosingkursu)

ugarchforecast(GARCHfit,n.ahead=250)

The forecast seems to be quite strange

*------------------------------------*
*       GARCH Model Forecast         *
*------------------------------------*
Model: sGARCH
Horizon: 30
Roll Steps: 0
Out of Sample: 0

0-roll forecast [T0=1976-11-23 01:00:00]:
     Series  Sigma
T+1   10.28 0.7802
T+2   10.30 0.8580
T+3   10.32 0.9264
T+4   10.34 0.9876
T+5   10.36 1.0429
T+6   10.38 1.0933
T+7   10.40 1.1395
T+8   10.43 1.1822
T+9   10.45 1.2217
T+10  10.47 1.2585
T+11  10.49 1.2927
T+12  10.51 1.3247
T+13  10.54 1.3547
T+14  10.56 1.3829
T+15  10.58 1.4093
T+16  10.60 1.4343
T+17  10.63 1.4578
T+18  10.65 1.4800
T+19  10.67 1.5010
T+20  10.69 1.5208
T+21  10.71 1.5396
T+22  10.74 1.5574
T+23  10.76 1.5743
T+24  10.78 1.5903
T+25  10.80 1.6056
T+26  10.82 1.6200
T+27  10.85 1.6338
T+28  10.87 1.6469
T+29  10.89 1.6593
T+30  10.91 1.6743

Also, how can it be, that every forecast for the same time series is the same but e(t+1) should be a random variable?

EDIT:

ugarchspec( variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE))

*---------------------------------*
*       GARCH Model Spec          *
*---------------------------------*

Conditional Variance Dynamics   
------------------------------------
GARCH Model             : sGARCH(1,1)
Variance Targeting      : FALSE 

Conditional Mean Dynamics
------------------------------------
Mean Model              : ARFIMA(2,0,2)
Include Mean            : TRUE 
GARCH-in-Mean           : FALSE 

Conditional Distribution
------------------------------------
Distribution    :  norm 
Includes Skew   :  FALSE 
Includes Shape  :  FALSE 
Includes Lambda :  FALSE 

ugarchfit(GARCHspec, closingkursu)

*---------------------------------*
*          GARCH Model Fit        *
*---------------------------------*

Conditional Variance Dynamics   
-----------------------------------
GARCH Model     : sGARCH(1,1)
Mean Model      : ARFIMA(2,0,2)
Distribution    : norm 

Optimal Parameters
------------------------------------
        Estimate  Std. Error     t value Pr(>|t|)
mu     24.000332    0.774681    30.98091  0.00000
ar1     1.795379    0.000456  3935.65863  0.00000
ar2    -0.795715    0.000360 -2209.69523  0.00000
ma1    -0.891371    0.026093   -34.16102  0.00000
ma2     0.008179    0.024713     0.33094  0.74069
omega   0.152244    0.020684     7.36031  0.00000
alpha1  0.229838    0.023339     9.84798  0.00000
beta1   0.729204    0.023038    31.65283  0.00000

Robust Standard Errors:
        Estimate  Std. Error     t value Pr(>|t|)
mu     24.000332    0.644910    37.21499 0.000000
ar1     1.795379    0.000731  2456.77236 0.000000
ar2    -0.795715    0.000471 -1687.85596 0.000000
ma1    -0.891371    0.035477   -25.12542 0.000000
ma2     0.008179    0.030585     0.26741 0.789156
omega   0.152244    0.040365     3.77172 0.000162
alpha1  0.229838    0.043371     5.29932 0.000000
beta1   0.729204    0.041929    17.39135 0.000000

LogLikelihood : -4427.411 

Information Criteria
------------------------------------

Akaike       3.5230
Bayes        3.5415
Shibata      3.5229
Hannan-Quinn 3.5297

Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
                         statistic p-value
Lag[1]                      0.1058  0.7449
Lag[2*(p+q)+(p+q)-1][11]    1.6123  1.0000
Lag[4*(p+q)+(p+q)-1][19]    5.5053  0.9859
d.o.f=4
H0 : No serial correlation

Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
                        statistic p-value
Lag[1]                    0.01876  0.8911
Lag[2*(p+q)+(p+q)-1][5]   4.39776  0.2084
Lag[4*(p+q)+(p+q)-1][9]   6.38265  0.2566
d.o.f=2

Weighted ARCH LM Tests
------------------------------------
            Statistic Shape Scale P-Value
ARCH Lag[3]     1.227 0.500 2.000  0.2681
ARCH Lag[5]     2.548 1.440 1.667  0.3623
ARCH Lag[7]     3.489 2.315 1.543  0.4262

Nyblom stability test
------------------------------------
Joint Statistic:  2.1259
Individual Statistics:              
mu     0.01831
ar1    0.34437
ar2    0.33567
ma1    0.06716
ma2    0.02932
omega  0.44909
alpha1 0.79120
beta1  1.02912

Asymptotic Critical Values (10% 5% 1%)
Joint Statistic:         1.89 2.11 2.59
Individual Statistic:    0.35 0.47 0.75

Sign Bias Test
------------------------------------
                   t-value      prob sig
Sign Bias           3.3842 0.0007247 ***
Negative Sign Bias  0.5320 0.5947678    
Positive Sign Bias  0.3897 0.6967648    
Joint Effect       19.5500 0.0002104 ***


Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
  group statistic p-value(g-1)
1    20     259.6    3.576e-44
2    30     286.2    4.244e-44
3    40     322.5    2.575e-46
4    50     348.2    1.040e-46


Elapsed time : 0.30832 
$\endgroup$
  • $\begingroup$ Could you clarify you question besides the one in the last paragraph? Also, you equation for the conditional variance model is a GARCH(1,2), not GARCH(1,1). $\endgroup$ – Richard Hardy Oct 30 '17 at 13:36
1
$\begingroup$

The forecast seems to be quite strange

What exactly do you mean? What is the question here?

Also, how can it be, that every forecast for the same time series is the same but e(t+1) should be a random variable?

The best point forecast for the error term e(t+1) under square loss is its estimated conditional mean, which is zero. You do not expect e(t+1) to actually be zero, but zero is your best guess. That is why the point forecast for e(t+1) is zero every time.

My goal is not to find the best guess but to model a time series model (at least that is what my professor said). So is there a way to set e(t+1) equal to a random variable with zero mean and the conditional variance instead of zero?

Your question title says "forecasting", so I answered it as such. Now if you want to model the time series for some other purpose, you can still use the same model as an approximation of the true data generating mechanism. If you want to simulate some paths from your estimated model, you can do that with the functions ugarchsim and/or ugarchpath. They will generate some random errors according to the estimated properties of those errors from the historical data.

$\endgroup$
  • $\begingroup$ I edited the print out in my question. My goal is not to find the best guess but to model a time series model (at least that is what my professor said). So is there a way to set e(t+1) equal to a random variable with zero mean and the conditional variance instead of zero? $\endgroup$ – user2968163 Oct 30 '17 at 14:01
  • $\begingroup$ Sorry for the confussion. I am pretty new to time series analysis and I mix up the different terms. ugarchsim/ugarchpath may be the methods I need. I will try them out and report back. $\endgroup$ – user2968163 Oct 30 '17 at 14:41
  • $\begingroup$ @user2968163, how is it going with ARMA-GARCH? $\endgroup$ – Richard Hardy Oct 31 '17 at 14:43
  • $\begingroup$ I am not quite sure if I am using ugarchpath right. The plot looks alright. Here is my Code: GARCHspec<-ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1),submodel = NULL, external.regressors = NULL, variance.targeting = FALSE),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE)) $\endgroup$ – user2968163 Nov 1 '17 at 21:19
  • $\begingroup$ GARCHfit<-ugarchfit(GARCHspec,diffclosingkursu) GARCHspecfixed<-ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1),submodel = NULL, external.regressors = NULL, variance.targeting = FALSE),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE),fixed.pars=list(mu=(-0.031455),ar1=(-0.096911),ar2=0.861134,ma1=0.023537,ma2=(-0.940248),omega=0.162944,alpha1=0.246904,beta1=0.711975)) GARCHforecast<-ugarchpath(GARCHspecfixed,closingkursu,n.sim=1000, n.start=0, m.sim=250) $\endgroup$ – user2968163 Nov 1 '17 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.