NAG FL Interface
g13fhf (uni_​garch_​exp_​forecast)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

g13fhf forecasts the conditional variances, ht,t=T+1,,T+ξ from an exponential GARCH(p,q) sequence, where ξ is the forecast horizon and T is the current time (see Engle and Ng (1993)).

2 Specification

Fortran Interface
Subroutine g13fhf ( num, nt, ip, iq, theta, fht, ht, et, ifail)
Integer, Intent (In) :: num, nt, ip, iq
Integer, Intent (Inout) :: ifail
Real (Kind=nag_wp), Intent (In) :: theta(2*iq+ip+1), ht(num), et(num)
Real (Kind=nag_wp), Intent (Out) :: fht(nt)
C Header Interface
#include <nag.h>
void  g13fhf_ (const Integer *num, const Integer *nt, const Integer *ip, const Integer *iq, const double theta[], double fht[], const double ht[], const double et[], Integer *ifail)
The routine may be called by the names g13fhf or nagf_tsa_uni_garch_exp_forecast.

3 Description

Assume the GARCH(p,q) process represented by:
ln(ht)=α0+i=1qαizt-i+j=1qϕi(|zt-j|-E[|zt-i|])+j=1pβiln(ht-j),  t=1,2,,T.  
where εtψt-1=N(0,ht) or εtψt-1=St(df,ht), and zt= εtht , E[|zt-i|] denotes the expected value of |zt-i|, has been modelled by g13fgf, and the estimated conditional variances and residuals are contained in the arrays ht and et respectively.
g13fhf will then use the last max(p,q) elements of the arrays ht and et to estimate the conditional variance forecasts, htψT, where t=T+1,,T+ξ and ξ is the forecast horizon.

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
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

5 Arguments

1: num Integer Input
On entry: the number of terms in the arrays ht and et from the modelled sequence.
Constraint: max(ip,iq)num.
2: nt Integer Input
On entry: ξ, the forecast horizon.
Constraint: nt>0.
3: ip Integer Input
On entry: the number of coefficients, βi, for i=1,2,,p.
Constraints:
  • max(ip,iq)20;
  • ip0.
4: iq Integer Input
On entry: the number of coefficients, αi, for i=1,2,,q.
Constraints:
  • max(ip,iq)20;
  • iq1.
5: theta(2×iq+ip+1) Real (Kind=nag_wp) array Input
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.
6: fht(nt) Real (Kind=nag_wp) array Output
On exit: the forecast values of the conditional variance, ht, for t=T+1,,T+ξ.
7: ht(num) Real (Kind=nag_wp) array Input
On entry: the sequence of past conditional variances for the GARCH(p,q) process, ht, for t=1,2,,T.
8: et(num) Real (Kind=nag_wp) array Input
On entry: the sequence of past residuals for the GARCH(p,q) process, εt, for t=1,2,,T.
9: ifail Integer Input/Output
On entry: ifail must be set to 0, -1 or 1 to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of 0 causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of -1 means that an error message is printed while a value of 1 means that it is not.
If halting is not appropriate, the value -1 or 1 is recommended. If message printing is undesirable, then the value 1 is recommended. Otherwise, the value 0 is recommended. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry ifail=0 or -1, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
ifail=1
On entry, ip=value.
Constraint: ip0.
On entry, iq=value.
Constraint: iq1.
On entry, max(ip,iq)=value.
Constraint: max(ip,iq)20.
On entry, nt=value.
Constraint: nt>0.
On entry, num=value.
Constraint: max(ip,iq)num.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

g13fhf is not threaded in any implementation.

9 Further Comments

None.

10 Example

See g13fgf.