g05pff generates a given number of terms of a GJR
process (see
Glosten et al. (1993)).
A GJR
process is represented by:
where
if
,
if
, and
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 negative shocks are to be enhanced.
One of the initialization routines
g05kff (for a repeatable sequence if computed sequentially) or
g05kgf (for a non-repeatable sequence) must be called prior to the first call to
g05pff.
Engle R (1982) Autoregressive conditional heteroskedasticity with estimates of the variance of United Kingdom inflation Econometrica 50 987–1008
Glosten L, Jagannathan R and Runkle D (1993) Relationship between the expected value and the volatility of nominal excess return on stocks Journal of Finance 48 1779–1801
-
1:
– Character(1)
Input
-
On entry: the type of distribution to use for
.
- A Normal distribution is used.
- A Student's -distribution is used.
Constraint:
or .
-
2:
– Integer
Input
-
On entry: , the number of terms in the sequence.
Constraint:
.
-
3:
– Integer
Input
-
On entry: the number of coefficients,
, for .
Constraint:
.
-
4:
– Integer
Input
-
On entry: the number of coefficients,
, for .
Constraint:
.
-
5:
– Real (Kind=nag_wp) array
Input
-
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 and .
-
6:
– Real (Kind=nag_wp)
Input
-
On entry: the asymmetry parameter for the sequence.
Constraint:
, for .
-
7:
– Integer
Input
-
On entry: the number of degrees of freedom for the Student's
-distribution.
If
,
df is not referenced.
Constraint:
if , .
-
8:
– Real (Kind=nag_wp) array
Output
-
On exit: the conditional variances
, for , for the sequence.
-
9:
– Real (Kind=nag_wp) array
Output
-
On exit: the observations
, for , for the sequence.
-
10:
– Logical
Input
-
On entry: if
, a new sequence is to be generated, otherwise a given sequence is to be continued using the information in
r.
-
11:
– Real (Kind=nag_wp) array
Communication Array
-
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 g05pff, with .
-
12:
– Integer
Input
-
On entry: the dimension of the array
r as declared in the (sub)program from which
g05pff is called.
Constraint:
.
-
13:
– Integer array
Communication Array
Note: the actual argument supplied
must be the array
state supplied to the initialization routines
g05kff or
g05kgf.
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:
– Integer
Input/Output
-
On entry:
ifail must be set to
,
or
to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value
or
is recommended. If message printing is undesirable, then the value
is recommended. Otherwise, the value
is recommended.
When the value or is used it is essential to test the value of ifail on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Not applicable.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
This example first calls
g05kff to initialize a base generator then calls
g05pff to generate two realizations, each consisting of ten observations, from a GJR
model.