Skip to contents

Class 'fGARCH' represents models fitted to heteroskedastic time series, including ARCH, GARCH, APARCH, ARMA-GARCH and ARMA-APARCH models.

Objects from the Class

Objects from class "fGARCH" can be created by calls of the function garchFit.

Slots

call:

Object of class "call", the call used to fit the model and create the object.

formula:

Object of class "formula", a formula object representing the mean and variance equations.

method:

Object of class "character", a string denoting the optimization method, by default "Max Log-Likelihood Estimation".

data:

Object of class "list", a list with one entry, x, containing the data of the time series to which the model is fitted.

fit:

Object of class "list", a list with the results from the parameter estimation. The entries of the list depend on the selected algorithm, see below.

residuals:

Object of class "numeric", the raw, unstandardized residuals.

fitted:

Object of class "numeric", the fitted values.

h.t:

Object of class "numeric", the conditional variances (\(h_t = \sigma_t^\delta\)).

sigma.t:

Object of class "numeric", the conditional standard deviations.

title:

Object of class "character", a title string.

description:

Object of class "character", a string with a brief description.

Methods

Besides the S4 methods described below, the are "fGARCH" methods (S3) for tsdiag (tsdiag), VaR (VaR), expected shortfall (ES), volatility (volatility), and maybe others.

plot

signature(x = "fGARCH", y = "missing"): plots an object of class "fGARCH", see the help page of the method for details and options.

show

signature(object = "fGARCH"): prints the object.

summary

signature(object = "fGARCH"): summarizes the object. The help page of the "fGARCH" method gives details on the output, as well as interpretation of the results.

predict

signature(object = "fGARCH"): Computes forecasts of the mean and some measures of risk (such as volatility, value-at-risk and expected shortfall), see the method's help page for full details.

fitted

signature(object = "fGARCH"): extracts fitted values from the object (help page).

residuals

signature(object = "fGARCH"): returns residuals from the fitted model (help page).

coef

signature(object = "fGARCH"): extracts the estimated coefficients (help page).

formula

signature(x = "fGARCH"): extracts the formula expression, see the method's help page.

update

signature(object = "fGARCH"): ...

Author

Diethelm Wuertz and Rmetrics Core Team

Examples

## simulate a time series, fit a GARCH(1,1) model, and show it:
x <- garchSim( garchSpec(), n = 500)
fit <- garchFit(~ garch(1, 1), data = x, trace = FALSE)
coef(fit)
#>            mu         omega        alpha1         beta1 
#> -1.194161e-04  1.333768e-06  9.172218e-02  7.721106e-01 
summary(fit)
#> 
#> Title:
#>  GARCH Modelling 
#> 
#> Call:
#>  garchFit(formula = ~garch(1, 1), data = x, trace = FALSE) 
#> 
#> Mean and Variance Equation:
#>  data ~ garch(1, 1)
#> <environment: 0x569a0ca3e748>
#>  [data = x]
#> 
#> Conditional Distribution:
#>  norm 
#> 
#> Coefficient(s):
#>          mu        omega       alpha1        beta1  
#> -1.1942e-04   1.3338e-06   9.1722e-02   7.7211e-01  
#> 
#> Std. Errors:
#>  based on Hessian 
#> 
#> Error Analysis:
#>          Estimate  Std. Error  t value Pr(>|t|)    
#> mu     -1.194e-04   1.333e-04   -0.896   0.3704    
#> omega   1.334e-06   8.414e-07    1.585   0.1129    
#> alpha1  9.172e-02   4.152e-02    2.209   0.0272 *  
#> beta1   7.721e-01   1.079e-01    7.155 8.35e-13 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Log Likelihood:
#>  2185.102    normalized:  4.370204 
#> 
#> Description:
#>  Tue Apr 30 14:51:44 2024 by user: georgi 
#> 
#> 
#> Standardised Residuals Tests:
#>                                  Statistic    p-Value
#>  Jarque-Bera Test   R    Chi^2   0.7057469 0.70266612
#>  Shapiro-Wilk Test  R    W       0.9979112 0.80185098
#>  Ljung-Box Test     R    Q(10)  18.0066406 0.05485173
#>  Ljung-Box Test     R    Q(15)  24.8843921 0.05151773
#>  Ljung-Box Test     R    Q(20)  26.4473832 0.15153936
#>  Ljung-Box Test     R^2  Q(10)  13.6251846 0.19078464
#>  Ljung-Box Test     R^2  Q(15)  15.4841586 0.41713680
#>  Ljung-Box Test     R^2  Q(20)  20.1909770 0.44604161
#>  LM Arch Test       R    TR^2   13.1132258 0.36086497
#> 
#> Information Criterion Statistics:
#>       AIC       BIC       SIC      HQIC 
#> -8.724407 -8.690690 -8.724534 -8.711177 
#> 
fit # == print(fit) and also == show(fit)
#> 
#> Title:
#>  GARCH Modelling 
#> 
#> Call:
#>  garchFit(formula = ~garch(1, 1), data = x, trace = FALSE) 
#> 
#> Mean and Variance Equation:
#>  data ~ garch(1, 1)
#> <environment: 0x569a0ca3e748>
#>  [data = x]
#> 
#> Conditional Distribution:
#>  norm 
#> 
#> Coefficient(s):
#>          mu        omega       alpha1        beta1  
#> -1.1942e-04   1.3338e-06   9.1722e-02   7.7211e-01  
#> 
#> Std. Errors:
#>  based on Hessian 
#> 
#> Error Analysis:
#>          Estimate  Std. Error  t value Pr(>|t|)    
#> mu     -1.194e-04   1.333e-04   -0.896   0.3704    
#> omega   1.334e-06   8.414e-07    1.585   0.1129    
#> alpha1  9.172e-02   4.152e-02    2.209   0.0272 *  
#> beta1   7.721e-01   1.079e-01    7.155 8.35e-13 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Log Likelihood:
#>  2185.102    normalized:  4.370204 
#> 
#> Description:
#>  Tue Apr 30 14:51:44 2024 by user: georgi 
#>