g05pg generates a given number of terms of an exponential GARCHp,q process (see Engle and Ng (1993)).

Syntax

C#
public static void g05pg(
	string dist,
	int num,
	int ip,
	int iq,
	double[] theta,
	int df,
	double[] ht,
	double[] et,
	bool fcall,
	double[] r,
	G05..::..G05State g05state,
	out int ifail
)
Visual Basic
Public Shared Sub g05pg ( _
	dist As String, _
	num As Integer, _
	ip As Integer, _
	iq As Integer, _
	theta As Double(), _
	df As Integer, _
	ht As Double(), _
	et As Double(), _
	fcall As Boolean, _
	r As Double(), _
	g05state As G05..::..G05State, _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
static void g05pg(
	String^ dist, 
	int num, 
	int ip, 
	int iq, 
	array<double>^ theta, 
	int df, 
	array<double>^ ht, 
	array<double>^ et, 
	bool fcall, 
	array<double>^ r, 
	G05..::..G05State^ g05state, 
	[OutAttribute] int% ifail
)
F#
static member g05pg : 
        dist : string * 
        num : int * 
        ip : int * 
        iq : int * 
        theta : float[] * 
        df : int * 
        ht : float[] * 
        et : float[] * 
        fcall : bool * 
        r : float[] * 
        g05state : G05..::..G05State * 
        ifail : int byref -> unit 

Parameters

dist
Type: System..::..String
On entry: the type of distribution to use for εt.
dist="N"
A Normal distribution is used.
dist="T"
A Student's t-distribution is used.
Constraint: dist="N" or "T".
num
Type: System..::..Int32
On entry: T, the number of terms in the sequence.
Constraint: num0.
ip
Type: System..::..Int32
On entry: the number of coefficients, βi, for i=1,2,,p.
Constraint: ip0.
iq
Type: System..::..Int32
On entry: the number of coefficients, αi, for i=1,2,,q.
Constraint: iq1.
theta
Type: array<System..::..Double>[]()[][]
An array of size [2×iq+ip+1]
On entry: the initial parameter estimates for the vector θ. The first element must contain the coefficient αo and the next iq elements must contain the autoregressive coefficients αi, for i=1,2,,q. The next iq elements must contain the coefficients ϕi, for i=1,2,,q. The next ip elements must contain the moving average coefficients βj, for j=1,2,,p.
Constraints:
  • i=1 p βi1.0;
  • α01- i=1 p βi-logx02am.
df
Type: System..::..Int32
On entry: the number of degrees of freedom for the Student's t-distribution.
If dist="N", df is not referenced.
Constraint: if dist="T", df>2.
ht
Type: array<System..::..Double>[]()[][]
An array of size [num]
On exit: the conditional variances ht, for t=1,2,,T, for the GARCHp,q sequence.
et
Type: array<System..::..Double>[]()[][]
An array of size [num]
On exit: the observations εt, for t=1,2,,T, for the GARCHp,q sequence.
fcall
Type: System..::..Boolean
On entry: if fcall=true, a new sequence is to be generated, otherwise a given sequence is to be continued using the information in r.
r
Type: array<System..::..Double>[]()[][]
An array of size [lr]
On entry: the array contains information required to continue a sequence if fcall=false.
On exit: contains information that can be used in a subsequent call of g05pg, with fcall=false.
g05state
Type: NagLibrary..::..G05..::..G05State
An Object of type G05.G05State.
ifail
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

Description

An exponential GARCHp,q process is represented by:
lnht=α0+i=1qαizt-i+i=1qϕizt-i-Ezt-i+j=1pβjlnht-j,  t=1,2,,T;
where zt=εtht, Ezt-i denotes the expected value of zt-i, and εtψt-1=N0,ht or εtψt-1=Stdf,ht. Here St is a standardized Student's t-distribution with df degrees of freedom and variance ht, T is the number of observations in the sequence, εt is the observed value of the GARCHp,q process at time t, ht is the conditional variance at time t, and ψt the set of all information up to time t.
One of the initialization methods (G05KFF not in this release) (for a repeatable sequence if computed sequentially) or (G05KGF not in this release) (for a non-repeatable sequence) must be called prior to the first call to g05pg.

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
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
Hamilton J (1994) Time Series Analysis Princeton University Press

Error Indicators and Warnings

Errors or warnings detected by the method:
ifail=1
On entry,dist"N" or "T".
ifail=2
On entry,num<0.
ifail=3
On entry,ip<0.
ifail=4
On entry,iq<1.
ifail=6
On entry,dist="T" and df2.
ifail=10
The value of ip or iq is not the same as when r was set up in a previous call.
ifail=11
On entry,lr<2×ip+iq+2.
ifail=12
On entry,state vector was not initialized or has been corrupted.
ifail=20
Invalid sequence generated, use different parameters.
ifail=-9000
An error occured, see message report.
ifail=-8000
Negative dimension for array value
ifail=-6000
Invalid Parameters value

Accuracy

Not applicable.

Parallelism and Performance

None.

Further Comments

None.

Example

See Also