g05pd generates a given number of terms of a type I AGARCHp,q process (see Engle and Ng (1993)).

Syntax

C#
public static void g05pd(
	string dist,
	int num,
	int ip,
	int iq,
	double[] theta,
	double gamma,
	int df,
	double[] ht,
	double[] et,
	bool fcall,
	double[] r,
	G05..::..G05State g05state,
	out int ifail
)
Visual Basic
Public Shared Sub g05pd ( _
	dist As String, _
	num As Integer, _
	ip As Integer, _
	iq As Integer, _
	theta As Double(), _
	gamma 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 g05pd(
	String^ dist, 
	int num, 
	int ip, 
	int iq, 
	array<double>^ theta, 
	double gamma, 
	int df, 
	array<double>^ ht, 
	array<double>^ et, 
	bool fcall, 
	array<double>^ r, 
	G05..::..G05State^ g05state, 
	[OutAttribute] int% ifail
)
F#
static member g05pd : 
        dist : string * 
        num : int * 
        ip : int * 
        iq : int * 
        theta : float[] * 
        gamma : 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 [iq+ip+1]
On entry: the first element must contain the coefficient αo, the next iq elements must contain the coefficients αi, for i=1,2,,q. The remaining ip elements must contain the coefficients βj, for j=1,2,,p.
Constraints:
  • i=2 iq+ip+1 theta[i-1]<1.0;
  • theta[i-1]0.0, for i=2,3,,ip+iq+1.
gamma
Type: System..::..Double
On entry: the asymmetry parameter γ for the GARCHp,q sequence.
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 g05pd, 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

A type I AGARCHp,q process can be represented by:
ht=α0+i=1qαiεt-i+γ2+i=1pβiht-i,  t=1,2,,T;
where ε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. 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 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 g05pd.

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

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=5
On entry, at least one theta[i-1]<0.0, for i=2,3,,ip+iq+1.
ifail=51
On entry, itheta[i-1]1.0, for i=2,3,,ip+iq+1.
ifail=7
On entry,dist="T" and df2.
ifail=11
The value of ip or iq is not the same as when r was set up in a previous call.
ifail=12
On entry,lr<2×ip+iq+2.
ifail=13
On entry,state vector was not initialized or has been corrupted.
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