nag_rand_agarchII (g05pec) generates a given number of terms of a type II
process (see
Engle and Ng (1993)).
A type II
process can be represented by:
where
or
. Here
is a standardized Student's
-distribution with
degrees of freedom and variance
,
is the number of observations in the sequence,
is the observed value of the
process at time
,
is the conditional variance at time
, and
the set of all information up to time
. Symmetric GARCH sequences are generated when
is zero, otherwise asymmetric GARCH sequences are generated with
specifying the amount by which positive (or negative) shocks are to be enhanced.
One of the initialization functions
nag_rand_init_repeatable (g05kfc) (for a repeatable sequence if computed sequentially) or
nag_rand_init_nonrepeatable (g05kgc) (for a non-repeatable sequence) must be called prior to the first call to nag_rand_agarchII (g05pec).
Engle R (1982) Autoregressive conditional heteroskedasticity with estimates of the variance of United Kingdom inflation Econometrica 50 987–1008
- 1:
dist – Nag_ErrorDistnInput
On entry: the type of distribution to use for
.
- A Normal distribution is used.
- A Student's -distribution is used.
Constraint:
or .
- 2:
num – IntegerInput
On entry: , the number of terms in the sequence.
Constraint:
.
- 3:
ip – IntegerInput
On entry: the number of coefficients,
, for .
Constraint:
.
- 4:
iq – IntegerInput
On entry: the number of coefficients,
, for .
Constraint:
.
- 5:
theta[] – const doubleInput
On entry: the first element must contain the coefficient
, the next
iq elements must contain the coefficients
, for
. The remaining
ip elements must contain the coefficients
, for
.
Constraints:
- ;
- , for .
- 6:
gamma – doubleInput
On entry: the asymmetry parameter for the sequence.
- 7:
df – IntegerInput
On entry: the number of degrees of freedom for the Student's
-distribution.
If
,
df is not referenced.
Constraint:
if , .
- 8:
ht[num] – doubleOutput
On exit: the conditional variances
, for , for the sequence.
- 9:
et[num] – doubleOutput
On exit: the observations
, for , for the sequence.
- 10:
fcall – Nag_BooleanInput
On entry: if
, a new sequence is to be generated, otherwise a given sequence is to be continued using the information in
r.
- 11:
r[lr] – doubleInput/Output
On entry: the array contains information required to continue a sequence if .
On exit: contains information that can be used in a subsequent call of nag_rand_agarchII (g05pec), with .
- 12:
lr – IntegerInput
On entry: the dimension of the array
r.
Constraint:
.
- 13:
state[] – IntegerCommunication Array
-
Note: the dimension,
, of this array is dictated by the requirements of associated functions that must have been previously called. This array MUST be the same array passed as argument
state in the previous call to
nag_rand_init_repeatable (g05kfc) or
nag_rand_init_nonrepeatable (g05kgc).
On entry: contains information on the selected base generator and its current state.
On exit: contains updated information on the state of the generator.
- 14:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
Not applicable.
nag_rand_agarchII (g05pec) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
This example first calls
nag_rand_init_repeatable (g05kfc) to initialize a base generator then calls nag_rand_agarchII (g05pec) to generate two realizations, each consisting of ten observations, from an asymmetric
model.
None.