2
$\begingroup$

When I build a GARCH(1,1) with a skewed generalised error dist to model the innovations, with a linear trend using the fGarch library I get the following:

mod = lm(Jobs ~ Month, df)

library(fGarch)
fit1 = garchFit(~garch(1,1), cond.dist="sged",  data= mod$residuals ,trace=F)

Model summary output:

Title:
 GARCH Modelling 

Call:
 garchFit(formula = ~garch(1, 1), data = yres1, cond.dist = "sged", 
    trace = F) 

Mean and Variance Equation:
 data ~ garch(1, 1)
<environment: 0x3a54c3a0>
 [data = yres1]

Conditional Distribution:
 sged 

Coefficient(s):
         mu        omega       alpha1        beta1         skew        shape  
-6.1535e-16   5.6885e-01   6.9053e-02   8.8967e-01   1.7432e+00   1.9838e+00  

Std. Errors:
 based on Hessian 

Error Analysis:
         Estimate  Std. Error  t value Pr(>|t|)    
mu     -6.154e-16   4.964e-01    0.000    1.000    
omega   5.688e-01   6.554e-01    0.868    0.385    
alpha1  6.905e-02   5.550e-02    1.244    0.213    
beta1   8.897e-01   6.919e-02   12.858  < 2e-16 ***
skew    1.743e+00   2.669e-01    6.532 6.51e-11 ***
shape   1.984e+00   3.916e-01    5.065 4.08e-07 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Log Likelihood:
 -329.9066    normalized:  -2.945595 

Description:
 Tue Jun 09 10:09:50 2020 by user: ben-i 


Standardised Residuals Tests:
                                Statistic p-Value    
 Jarque-Bera Test   R    Chi^2  12.39209  0.002037473
 Shapiro-Wilk Test  R    W      0.9560595 0.001006272
 Ljung-Box Test     R    Q(10)  5.87567   0.8255984  
 Ljung-Box Test     R    Q(15)  11.69413  0.7020176  
 Ljung-Box Test     R    Q(20)  15.61049  0.7404756  
 Ljung-Box Test     R^2  Q(10)  11.52942  0.3177839  
 Ljung-Box Test     R^2  Q(15)  13.25381  0.5827007  
 Ljung-Box Test     R^2  Q(20)  14.56133  0.800934   
 LM Arch Test       R    TR^2   17.38531  0.1356689  

Information Criterion Statistics:
     AIC      BIC      SIC     HQIC 
5.998332 6.143966 5.992972 6.057420 

Plot:

plot.ts(sigma(fit1), ylab="sigma(t)", col="blue")

fGarch plot

first 14 values:

sigma(fit1)
5.239727 5.806760 5.837686 5.855970 5.722280 5.920535 5.747552 5.489287 5.274133 5.225501 7.195435 7.082418 6.744105 6.736294

And when I use the rugarch library I get the following:

library(rugarch)
spec = ugarchspec(variance.model=list(model="sGARCH", garchOrder=c(1,1)), 
        mean.model=list(armaOrder=c(0,0), external.regressors = matrix(df$Month)),  
        distribution.model="sged")
fit2 <- ugarchfit(data = df$Jobs, spec = spec)

Model summary output:

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

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

Optimal Parameters
------------------------------------
        Estimate  Std. Error    t value Pr(>|t|)
mu     14.491863    0.756088  19.166899 0.000000
mxreg1 -0.087486    0.012902  -6.780849 0.000000
omega   0.000000    0.003364   0.000085 0.999932
alpha1  0.003441    0.004869   0.706637 0.479792
beta1   0.987222    0.007582 130.210874 0.000000
skew    2.140304    0.524488   4.080750 0.000045
shape   1.952177    0.418083   4.669351 0.000003

Robust Standard Errors:
        Estimate  Std. Error   t value Pr(>|t|)
mu     14.491863    1.358462 10.667844 0.000000
mxreg1 -0.087486    0.025644 -3.411523 0.000646
omega   0.000000    0.000437  0.000658 0.999475
alpha1  0.003441    0.007121  0.483161 0.628981
beta1   0.987222    0.011632 84.874789 0.000000
skew    2.140304    0.939204  2.278850 0.022676
shape   1.952177    0.701973  2.780984 0.005419

LogLikelihood : -329.0167 

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

Akaike       6.0003
Bayes        6.1702
Shibata      5.9931
Hannan-Quinn 6.0692

Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
                        statistic p-value
Lag[1]                     0.7412  0.3893
Lag[2*(p+q)+(p+q)-1][2]    0.8391  0.5535
Lag[4*(p+q)+(p+q)-1][5]    1.1372  0.8279
d.o.f=0
H0 : No serial correlation

Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
                        statistic p-value
Lag[1]                     0.2884  0.5912
Lag[2*(p+q)+(p+q)-1][5]    1.3548  0.7755
Lag[4*(p+q)+(p+q)-1][9]    6.3467  0.2603
d.o.f=2

Weighted ARCH LM Tests
------------------------------------
            Statistic Shape Scale P-Value
ARCH Lag[3]    0.2343 0.500 2.000  0.6284
ARCH Lag[5]    2.2926 1.440 1.667  0.4101
ARCH Lag[7]    3.7211 2.315 1.543  0.3886

Nyblom stability test
------------------------------------
Joint Statistic:  1.1102
Individual Statistics:              
mu     0.16284
mxreg1 0.15200
omega  0.05662
alpha1 0.07337
beta1  0.06320
skew   0.06851
shape  0.12872

Asymptotic Critical Values (10% 5% 1%)
Joint Statistic:         1.69 1.9 2.35
Individual Statistic:    0.35 0.47 0.75

Sign Bias Test
------------------------------------


Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
  group statistic p-value(g-1)
1    20     17.29       0.5705
2    30     22.46       0.8005
3    40     30.86       0.8208
4    50     35.32       0.9289

Plot:

plot.ts(sigma(fit2), ylab="sigma(t)", col="blue")

ruGarch plot

First 14 values:

volatility(fit2)
5.379336 5.373246 5.347906 5.322474 5.291569 5.273909 5.252040 5.218381 5.190804 5.162108 5.280149 5.256321 5.222694 5.202587

Why are the values for the unconditional variance so different? Are the models not identically specified?

$\endgroup$
6
  • $\begingroup$ Why are the time scales so different (see the $x$ axes)? Could you print out the summary of model fit in each case? $\endgroup$ Commented Jun 9, 2020 at 16:14
  • $\begingroup$ @RichardHardy That may be the issue, however the volatility values are different for both models. I have updated the post with all the information you asked for. $\endgroup$
    – user553480
    Commented Jun 9, 2020 at 16:28
  • $\begingroup$ The estimates of $\alpha$ and $\beta$ differ considerably. The second model produces something like a GARCH(p,0) which I have discussed in the thread "Does GARCH(p,0) make sense at all?" (it does not, in most cases). That does not tell us why they differ, however. It could be a numerical issue, in which case it would be quite a warning about the sensitivity of the model to the solver. Can you ensure that the same solver is used in both cases and compare the results then? $\endgroup$ Commented Jun 9, 2020 at 16:31
  • $\begingroup$ Ah, I will take your point onboard about running a GARCH(p,0) model, thank you. Also, I get the same results as before using the "nlminb" algorithm for both models, so that doesn't seem to be the issue. $\endgroup$
    – user553480
    Commented Jun 9, 2020 at 16:47
  • $\begingroup$ Wow, that is becoming a real puzzle! Perhaps the starting values are different? There was something about that in Sucarrat's working paper "garchx: Flexible and Robust GARCH-X Modelling", but one could just check the documentation directly. $\endgroup$ Commented Jun 9, 2020 at 16:51

1 Answer 1

1
$\begingroup$

The fitted model coefficients are considerably different (compare the estimates of $\alpha$ and $\beta$ across the models), hence the difference in fitted conditional standard deviations is unsurprising. The reason could be

  • different solvers used for numerical optimization of the likelihood functions,
  • different starting values,

among other. After your updates, it appears it was the starting values causing the discrepancy.

(A side issue is that the estimation sequence is not identical; in one case, the estimation is done in one step, in the other case in two. But given that the regressor is a linear time trend and the estimation of the slope will likely be about as precise in each case due to the superconsistency of estimators with linearly trending regressors, this does not seem to have the potential of causing such large differences between fitted $\sigma_t$s as observed in your case.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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