nag_estimate_agarchI (g13fac) estimates the parameters of a standard univariate regression-GARCH
or a univariate regression-type I AGARCH
process (see
Engle and Ng (1993)).
When
, nag_estimate_agarchI (g13fac) models a standard
univariate regression-GARCH
process, with
coefficients
, for
,
coefficients,
, for
, mean
, and
linear regression coefficients
, for
, which can be represented by:
When
, nag_estimate_agarchI (g13fac) models an asymmetric GARCH
process where the conditional variance
is given by:
Here
the number of terms in the sequence,
denotes the endogenous variables,
the exogenous variables,
the mean,
the regression coefficients,
the residuals,
the asymmetry parameter,
the conditional variance, and
the information set of all information up to time
.
isym,
mn,
nreg can be used to simplify the GARCH
expression in
(1) as follows:
Note: if the
, where
is known (not to be estimated by nag_estimate_agarchI (g13fac)) then
(1) can be written as
, where
. This corresponds to the case
No Regression or Mean, with
replaced by
.
Engle R (1982) Autoregressive conditional heteroskedasticity with estimates of the variance of United Kingdom inflation Econometrica 50 987–1008
- 1:
– const doubleInput
-
On entry: the sequence of observations, , for .
- 2:
– const doubleInput
-
Note: the th element of the th vector is stored in .
On entry: row
of
x must contain the time dependent exogenous vector
, where
, for
.
- 3:
– IntegerInput
-
On entry: the stride separating matrix column elements in the array
x.
Constraint:
.
- 4:
– IntegerInput
-
On entry: the number of terms in the sequence, .
Constraint:
.
- 5:
– IntegerInput
-
On entry: the GARCH parameter .
Constraint:
.
- 6:
– IntegerInput
-
On entry: the GARCH parameter .
Constraint:
.
- 7:
– IntegerInput
-
On entry: , the number of refression coefficients.
Constraint:
.
- 8:
– IntegerInput
-
On entry: if , the mean term will be included in the model.
Constraint:
or .
- 9:
– IntegerInput
-
On entry: if , the asymmetry term will be included in the model.
Constraint:
or .
- 10:
– doubleInput/Output
-
On entry: the initial parameter estimates for the vector
.
The first element contains the coefficient
, the next
q elements contain the autoregressive coefficients
, for
.
The next
p elements are the moving average coefficients
, for
.
The next element contains the asymmetry parameter .
If
, (when
) the next term contains an initial estimate of the mean term
and the remaining
nreg elements are taken as initial estimates of the linear regression coefficients
, for
.
On exit: the estimated values
for the vector
.
The first element contains the coefficient
, the next
q elements contain the coefficients
, for
.
The next
p elements are the coefficients
, for
.
The next element contains the estimate for the asymmetry parameter .
If , the next element contains an estimate for the mean term .
The final
nreg elements are the estimated linear regression coefficients
, for
.
- 11:
– doubleOutput
-
On exit: the standard errors for
.
The first element contains the standard error for .
The next
q elements contain the standard errors for
, for
.
The next
p elements are the standard errors for
, for
.
If , the next element contains the standard error for .
If , the next element contains the standard error for .
The final
nreg elements are the standard errors for
, for
.
- 12:
– doubleOutput
-
On exit: the scores for
.
The first element contains the score for .
The next
q elements contain the score for
, for
.
The next
p elements are the scores for
, for
.
If , the next element contains the score for .
If , the next element contains the score for .
The final
nreg elements are the scores for
, for
.
- 13:
– doubleOutput
-
Note: the th element of the matrix is stored in .
On exit: the covariance matrix of the parameter estimates , that is the inverse of the Fisher Information Matrix.
- 14:
– IntegerInput
-
On entry: the stride separating matrix column elements in the array
covar.
Constraint:
.
- 15:
– double *Input/Output
-
On entry: if
,
hp is the value to be used for the pre-observed conditional variance.
If
,
hp is not referenced.
On exit: if
,
hp is the estimated value of the pre-observed of the conditional variance.
- 16:
– doubleOutput
-
On exit: the estimated residuals, , for .
- 17:
– doubleOutput
-
On exit: the estimated conditional variances, , for .
- 18:
– double *Output
-
On exit: the value of the log likelihood function at .
- 19:
– Nag_Garch_Stationary_TypeInput
-
On entry: if
, Stationary conditions are enforced.
If , Stationary conditions are not enforced.
Constraint:
or .
- 20:
– Nag_Garch_Est_Initial_TypeInput
-
On entry: if
, the function provides initial parameter estimates of the regression terms
.
If , you must supply the initial estimations of the regression parameters .
Constraint:
or .
- 21:
– IntegerInput
-
On entry: the maximum number of iterations to be used by the optimization function when estimating the GARCH
parameters. If
max_iter is set to 0, the standard errors, score vector and variance-covariance are calculated for the input value of
in
theta; however the value of
is not updated.
Constraint:
.
- 22:
– doubleInput
-
On entry: the tolerance to be used by the optimization function when estimating the GARCH parameters.
- 23:
– NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
- NE_2_INT_ARG_LT
-
On entry, while .
These parameters must satisfy .
On entry, while .
These parameters must satisfy .
On entry, while .
These parameters must satisfy .
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
- NE_BAD_PARAM
-
On entry, argument
est_opt had an illegal value.
On entry, argument
stat_opt had an illegal value.
- NE_INT_ARG_LT
-
On entry,
max_iter must not be less than 0:
.
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INTERNAL_ERROR
-
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
- NE_INVALID_INT_RANGE_2
-
Value
given to
isym is not valid. Correct range is 0 to 1.
Value
given to
mn is not valid. Correct range is 0 to 1.
- NE_MAT_NOT_FULL_RANK
-
Matrix does not give a model of full rank.
- NE_MAT_NOT_POS_DEF
-
Attempt to invert the second derivative matrix needed in the calculation of the covariance matrix of the parameter estimates has failed. The matrix is not positive definite, possibly due to rounding errors.
Not applicable.
Not applicable.
None.
This example program illustrates the use of nag_estimate_agarchI (g13fac) to model a GARCH(1,1) sequence generated by
nag_rand_agarchI (g05pdc), a three step forecast is then calculated using
nag_forecast_agarchI (g13fbc).
None.