NAG CL Interface
g13fcc (uni_garch_asym2_estim)
1
Purpose
g13fcc estimates the arguments of a univariate regression-type II AGARCH process.
2
Specification
void |
g13fcc (const double yt[],
const double x[],
Integer tdx,
Integer num,
Integer p,
Integer q,
Integer nreg,
Integer mn,
double theta[],
double se[],
double sc[],
double covar[],
Integer tdc,
double *hp,
double et[],
double ht[],
double *lgf,
Nag_Garch_Stationary_Type stat_opt,
Nag_Garch_Est_Initial_Type est_opt,
Integer max_iter,
double tol,
NagError *fail) |
|
The function may be called by the names: g13fcc, nag_tsa_uni_garch_asym2_estim or nag_estimate_agarchii.
3
Description
A univariate regression-type II AGARCH
process, with
coefficients
, for
,
, coefficients,
, for
, mean
, and
linear regression coefficients
, for
, can be represented by:
Here
is the number of terms in the sequence,
denotes the endogenous variables,
the exogenous variables,
the mean,
the regression coefficients,
the residuals,
the asymmetry argument,
the conditional variance, and
the information set of all information up to time
.
g13fcc provides an estimate for , the parameter vector where and .
mn,
nreg can be used to simplify the GARCH
expression in equation
(1) as follows:
No Regression or Mean
- ,
- ,
- , and
- is a vector.
No Regression
- ,
- ,
- , and
- is a vector.
Note: if the
, where
is known (not to be estimated by
g13fcc) then equation
(1) can be written as
, where
. This corresponds to the case
No Regression or Mean, with
replaced by
.
No Mean
- ,
- ,
- and
- is a vector.
4
References
Bollerslev T (1986) Generalised autoregressive conditional heteroskedasticity Journal of Econometrics 31 307–327
Engle R (1982) Autoregressive conditional heteroskedasticity with estimates of the variance of United Kingdom inflation Econometrica 50 987–1008
Engle R and Ng V (1993) Measuring and testing the impact of news on volatility Journal of Finance 48 1749–1777
Hamilton J (1994) Time Series Analysis Princeton University Press
5
Arguments
Note: for convenience npar will be used here to denote the expression representing the number of model parameters.
-
1:
– const double
Input
-
On entry: the sequence of observations, , for .
-
2:
– const double
Input
-
Note: th element of the th vector is stored in .
On entry: row
of
x must contain the time dependent exogenous vector
, where
, for
.
-
3:
– Integer
Input
-
On entry: the stride separating matrix column elements in the array
x.
Constraint:
.
-
4:
– Integer
Input
-
On entry: the number of terms in the sequence, .
Constraint:
.
-
5:
– Integer
Input
-
On entry: the GARCH argument .
Constraint:
.
-
6:
– Integer
Input
-
On entry: the GARCH argument .
Constraint:
.
-
7:
– Integer
Input
-
On entry: , the number of refression coefficients.
Constraint:
.
-
8:
– Integer
Input
-
On entry: if , the mean term will be included in the model.
Constraint:
or .
-
9:
– double
Input/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 argument .
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
.
-
10:
– double
Output
-
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
.
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
.
-
11:
– double
Output
-
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
.
The next element contains the score for .
If , the next element contains the score for .
The final
nreg elements are the scores for
, for
.
-
12:
– double
Output
-
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.
-
13:
– Integer
Input
-
On entry: the stride separating matrix column elements in the array
covar.
Constraint:
.
-
14:
– 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.
-
15:
– double
Output
-
On exit: the estimated residuals, , for .
-
16:
– double
Output
-
On exit: the estimated conditional variances, , for .
-
17:
– double *
Output
-
On exit: the value of the log-likelihood function at .
-
18:
– Nag_Garch_Stationary_Type
Input
-
On entry: if
, Stationary conditions are enforced.
If , Stationary conditions are not enforced.
Constraint:
or .
-
19:
– Nag_Garch_Est_Initial_Type
Input
-
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 .
-
20:
– Integer
Input
-
On entry: the maximum number of iterations to be used by the optimization function when estimating the GARCH
arguments. If
max_iter is set to
, 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:
.
-
21:
– double
Input
-
On entry: the tolerance to be used by the optimization function when estimating the GARCH parameters.
-
22:
– NagError *
Input/Output
-
The NAG error argument (see
Section 7 in the Introduction to the NAG Library CL Interface).
6
Error Indicators and Warnings
- NE_2_INT_ARG_LT
-
On entry, while . These arguments must satisfy .
On entry, while . These arguments must satisfy .
On entry, while . These arguments 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
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.
7
Accuracy
Not applicable.
8
Parallelism and Performance
g13fcc is not threaded in any implementation.
None.
10
Example
This example program illustrates the use of
g13fcc to model a GARCH(1,1) sequence generated by
g05pec, a three step forecast is then calculated using
g13fdc.
10.1
Program Text
10.2
Program Data
None.
10.3
Program Results