Generalized AutoRegressive Conditional Heteroskedasticity(GARCH) is a statistic model used to analysis variance of error (innovation or residual) term in time series. It is typically used in the analyzing of financial data, such as estimation of volatility of returns for stocks and bonds.

hanaml.GARCH(
  data = NULL,
  key = NULL,
  endog = NULL,
  p = NULL,
  q = NULL,
  thread.ratio = NULL,
  model.type = NULL
)

Arguments

data

DataFrame
Input DataFrame containing the time-series data for GARCH modeling and analysis.

key

character
The ID column that representing the order of time-series values in data.

endog

character, optional
The column in data that holds the endogenous variable(i.e. time-series values) for GARCH modeling.
Defaults to the 1st non-key column in data.

p

integer, optional
Specifies the number of lagged error terms in GARCH model.
Defaults to 1.

q

integer, optional
Specifies the number of lagged variance terms in GARCH model.
Defaults to 1.

thread.ratio

double, optional
Controls the proportion of available threads that can be used by this function.
The value range is from 0 to 1, where 0 indicates a single thread, and 1 indicates all available threads.
Values between 0 and 1 will use up to that percentage of available threads.Values outside this range are ignored.
Defaults to 0.

model.type

character, optional
Specifies the variant of GARCH model.

  • "garch": the regular GARCH model.

  • "igarch": the integrated GARCH model.

  • "tgarch": the threshold GARCH model.

  • "egarch": the exponential GARCH model.

Defaults to "garch".

Value

A **GARCH** object with the following attributes:

  • model: DataFrame
    DataFrame for storing the fitted GARCH model, structured as follows:

    • 1st column : ROW_INDEX, type INTEGER,

    • 2nd column : MODEL_CONTENT, type NCLOB

    Set to NULL if GARCH model is not fitted.

  • variance: DataFrame
    For storing the variance information of the training data, structured as follows:

    • 1st column : Same name and type as the index(timestamp) column in the training data.

    • 2nd column : VARIANCE, type DOUBLE, representing the conditional variance of residual term.

    • 3rd column : RESIDUAL, type DOUBLE, representing the residual value.

    set to NULL if GARCH model is not fitted.

  • stats: DataFrame
    DataFrame for storing the related statistics in fitting GARCH model.

  • 1st column: STAT_NAME, type NVARCHAR(1000)

  • 2nd column : STAT_VALUE, type NVARCHAR(1000)

Details

GARCH assumes variance of error term is heteroskedastic which means it is not a constant value. In appearance, it tends to cluster. GARCH assumes variance of error term subjects to an autoregressive moving average(ARMA) pattern, in other words it is an average of past values.

Examples

Input data:


  > data
     TIME VAR1 VAR2 VAR3
  1     1    2 0.17    A
  2     2    2 0.19    A
  3     3    2 0.28    A
  4     4    2 0.35    A
  5     5    2 1.04    A
  6     6    2 1.12    A
  7     7    2 1.99    A
  8     8    2 0.73    A
  9     9    2 0.50    A
  10   10    2 0.32    A
  11   11    2 0.40    A
  12   12    2 0.38    A
  13   13    2 0.33    A
  14   14    2 0.39    A
  15   15    2 0.98    A
  16   16    2 0.70    A
  17   17    2 0.89    A
  18   18    2 1.21    A
  19   19    2 1.32    A
  20   20    2 1.10    A
  


  > gh <- hanaml.GARCH(data=data,
                       key="TIME",
                       endog="VAR2",
                       p=1, q=1,
                       model.type="garch")
  


  > gh$model
       ROW_INDEX                      MODEL_CONTENT
  1            0  {"garch":{...},"version":"0.1.0"}
  

See also