hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_tsa_uni_garch_exp_estim (g13fg)

Purpose

nag_tsa_uni_garch_exp_estim (g13fg) estimates the parameters of a univariate regression-exponential GARCH(p,q)GARCH(p,q) process (see Engle and Ng (1993)).

Syntax

[theta, se, sc, covr, hp, et, ht, lgf, ifail] = g13fg(dist, yt, x, ip, iq, nreg, mn, theta, hp, copts, maxit, tol, 'num', num, 'npar', npar)
[theta, se, sc, covr, hp, et, ht, lgf, ifail] = nag_tsa_uni_garch_exp_estim(dist, yt, x, ip, iq, nreg, mn, theta, hp, copts, maxit, tol, 'num', num, 'npar', npar)

Description

A univariate regression-exponential GARCH(p,q)GARCH(p,q) process, with qq coefficients αiαi, for i = 1,2,,qi=1,2,,q, qq coefficients φiϕi, for i = 1,2,,qi=1,2,,q, pp coefficients, βiβi, for i = 1,2,,pi=1,2,,p, and kk linear regression coefficients bibi, for i = 1,2,,ki=1,2,,k, can be represented by:
yt = bo + xtT b + εt
q q p
ln(ht) = α0 + αizti + φi (|zti|E[|zti|]) + βiln(hti),  t = 1,2,,T
i = 1 i = 1 i = 1
yt = bo + xtT b + εt ln(ht) = α0+ i=1 q αi zt-i + i=1 q ϕi ( | zt-i | - E [ | zt-i | ] ) + i=1 p βi ln ( ht-i ) ,   t=1,2,,T
(1)
where zt = (εt)/(sqrt(ht)) zt= εt ht , E[|zti|]E[|zt-i|] denotes the expected value of |zti||zt-i| and εtψt1 = N(0,ht)εtψt-1=N(0,ht) or εtψt1 = St(df,ht)εtψt-1=St(df,ht). Here StSt is a standardized Student's tt-distribution with dfdf degrees of freedom and variance htht, TT is the number of terms in the sequence, ytyt denotes the endogenous variables, xtxt the exogenous variables, bobo the regression mean, bb the regression coefficients, εtεt the residuals, htht the conditional variance, dfdf the number of degrees of freedom of the Student's tt-distribution, and ψtψt the set of all information up to time tt.
nag_tsa_uni_garch_exp_estim (g13fg) provides an estimate θ̂θ^, for the vector θ = (bo,bT,ωT) θ = (bo,bT,ωT)  where bT = (b1,,bk) bT = (b1,,bk) , ωT = (α0,α1,,αq,φ1,,φq,β1,,βp,γ) ωT = (α0,α1,,αq,ϕ1,,ϕq,β1,,βp,γ)  when dist = 'N'dist='N', and ωT = (α0,α1,,αq,φ1,,φq,β1,,βp,γ,df) ωT = (α0,α1,,αq,ϕ1,,ϕq,β1,,βp,γ,df)  when dist = 'T'dist='T'.
mn, nreg can be used to simplify the GARCH(p,q)GARCH(p,q) expression in (1) as follows:
No Regression and No Mean
No Regression
Note:  if the yt = μ + εtyt=μ+εt, where μμ is known (not to be estimated by nag_tsa_uni_garch_exp_estim (g13fg)) then (1) can be written as ytμ = εtytμ=εt, where ytμ = ytμytμ=yt-μ. This corresponds to the case No Regression and No Mean, with ytyt replaced by ytμyt-μ.
No Mean

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

Parameters

Compulsory Input Parameters

1:     dist – string (length ≥ 1)
The type of distribution to use for etet.
dist = 'N'dist='N'
A Normal distribution is used.
dist = 'T'dist='T'
A Student's tt-distribution is used.
Constraint: dist = 'N'dist='N' or 'T''T'.
2:     yt(num) – double array
num, the dimension of the array, must satisfy the constraint
  • nummax (ip,iq)nummax(ip,iq)
  • numnreg + mnnumnreg+mn
  • .
    The sequence of observations, ytyt, for t = 1,2,,Tt=1,2,,T.
    3:     x(ldx, : :) – double array
    The first dimension of the array x must be at least numnum
    The second dimension of the array must be at least nregnreg
    Row tt of x must contain the time dependent exogenous vector xt xt , where xtT = (xt1,,xtk) xtT = (xt1,,xtk) , for t = 1,2,,Tt=1,2,,T.
    4:     ip – int64int32nag_int scalar
    The number of coefficients, βiβi, for i = 1,2,,pi=1,2,,p.
    Constraint: ip0ip0 (see also npar).
    5:     iq – int64int32nag_int scalar
    The number of coefficients, αiαi, for i = 1,2,,qi=1,2,,q.
    Constraint: iq1iq1 (see also npar).
    6:     nreg – int64int32nag_int scalar
    kk, the number of regression coefficients.
    Constraint: nreg0nreg0 (see also npar).
    7:     mn – int64int32nag_int scalar
    If mn = 1mn=1, the mean term b0b0 will be included in the model.
    Constraint: mn = 0mn=0 or 11.
    8:     theta(npar) – double array
    npar, the dimension of the array, must satisfy the constraint npar < 20npar<20.
    The initial parameter estimates for the vector θθ.
    The first element must contain the coefficient αoαo and the next iq elements must contain the autoregressive coefficients αiαi, for i = 1,2,,qi=1,2,,q.
    The next iq elements contain the coefficients φiϕi, for i = 1,2,,qi=1,2,,q.
    The next ip elements must contain the moving average coefficients βiβi, for i = 1,2,,pi=1,2,,p.
    If dist = 'T'dist='T', the next element must contain an estimate for dfdf, the number of degrees of freedom of the Student's tt-distribution.
    If mn = 1mn=1, the next element must contain the mean term bobo.
    If copts = falsecopts=false, the remaining nreg elements are taken as initial estimates of the linear regression coefficients bibi, for i = 1,2,,ki=1,2,,k.
    9:     hp – double scalar
    If copts = falsecopts=false then hp is the value to be used for the pre-observed conditional variance, otherwise hp is not referenced.
    10:   copts – logical scalar
    If copts = truecopts=true, the function provides initial parameter estimates of the regression terms, otherwise these are provided by you.
    11:   maxit – int64int32nag_int scalar
    The maximum number of iterations to be used by the optimization function when estimating the GARCH(p,q)GARCH(p,q) parameters.
    Constraint: maxit > 0maxit>0.
    12:   tol – double scalar
    The tolerance to be used by the optimization function when estimating the GARCH(p,q)GARCH(p,q) parameters.

    Optional Input Parameters

    1:     num – int64int32nag_int scalar
    Default: The dimension of the array yt and the first dimension of the array x. (An error is raised if these dimensions are not equal.)
    TT, the number of terms in the sequence.
    Constraints:
    2:     npar – int64int32nag_int scalar
    Default: The dimension of the array theta.
    The number of parameters to be included in the model. npar = 1 + 2 × iq + ip + mn + nregnpar=1+2×iq+ip+mn+nreg when dist = 'N'dist='N' and npar = 2 + 2 × iq + ip + mn + nregnpar=2+2×iq+ip+mn+nreg when dist = 'T'dist='T'.
    Constraint: npar < 20npar<20.

    Input Parameters Omitted from the MATLAB Interface

    ldx ldcovr work lwork

    Output Parameters

    1:     theta(npar) – double array
    The estimated values θ̂θ^ for the vector θθ.
    The first element contains the coefficient αoαo and the next iq elements contain the coefficients αiαi, for i = 1,2,,qi=1,2,,q.
    The next iq elements contain the coefficients φiϕi, for i = 1,2,,qi=1,2,,q.
    The next ip elements are the moving average coefficients βiβi, for i = 1,2,,pi=1,2,,p.
    If dist = 'T'dist='T', the next element contains an estimate for dfdf then the number of degrees of freedom of the Student's tt-distribution.
    If mn = 1mn=1, the next element contains an estimate for the mean term bobo.
    The final nreg elements are the estimated linear regression coefficients bibi, for i = 1,2,,ki=1,2,,k.
    2:     se(npar) – double array
    The standard errors for θ̂θ^.
    The first element contains the standard error for αoαo and the next iq elements contain the standard errors for αiαi, for i = 1,2,,qi=1,2,,q. The next iq elements contain the standard errors for φiϕi, for i = 1,2,,qi=1,2,,q. The next ip elements are the standard errors for βjβj, for j = 1,2,,pj=1,2,,p.
    If dist = 'T'dist='T', the next element contains the standard error for dfdf, the number of degrees of freedom of the Student's tt-distribution.
    If mn = 1mn=1, the next element contains the standard error for bobo.
    The final nreg elements are the standard errors for bjbj, for j = 1,2,,kj=1,2,,k.
    3:     sc(npar) – double array
    The scores for θ̂θ^.
    The first element contains the scores for αoαo, the next iq elements contain the scores for αiαi, for i = 1,2,,qi=1,2,,q, the next iq elements contain the scores for φiϕi, for i = 1,2,,qi=1,2,,q, the next ip elements are the scores for βjβj, for j = 1,2,,pj=1,2,,p.
    If dist = 'T'dist='T', the next element contains the scores for dfdf, the number of degrees of freedom of the Student's tt-distribution.
    If mn = 1mn=1, the next element contains the score for bobo.
    The final nreg elements are the scores for bjbj, for j = 1,2,,kj=1,2,,k.
    4:     covr(ldcovr,npar) – double array
    ldcovrnparldcovrnpar.
    The covariance matrix of the parameter estimates θ̂θ^, that is the inverse of the Fisher Information Matrix.
    5:     hp – double scalar
    If copts = truecopts=true then hp is the estimated value of the pre-observed conditional variance.
    6:     et(num) – double array
    The estimated residuals, εtεt, for t = 1,2,,Tt=1,2,,T.
    7:     ht(num) – double array
    The estimated conditional variances, htht, for t = 1,2,,Tt=1,2,,T.
    8:     lgf – double scalar
    The value of the log-likelihood function at θ̂θ^.
    9:     ifail – int64int32nag_int scalar
    ifail = 0ifail=0 unless the function detects an error (see [Error Indicators and Warnings]).

    Error Indicators and Warnings

    Note: nag_tsa_uni_garch_exp_estim (g13fg) may return useful information for one or more of the following detected errors or warnings.
    Errors or warnings detected by the function:
      ifail = 1ifail=1
    On entry,nreg < 0nreg<0,
    ormn > 1mn>1,
    ormn < 0mn<0,
    oriq < 1iq<1,
    orip < 0ip<0,
    ornpar20npar20,
    ornpar has an invalid value,
    orldcovr < nparldcovr<npar,
    orldx < numldx<num,
    ordist'N'dist'N',
    ordist'T'dist'T',
    ormaxit0maxit0,
    ornum < max (ip,iq)num<max(ip,iq),
    ornum < nreg + mnnum<nreg+mn.
      ifail = 2ifail=2
    On entry,lwork < (nreg + 3) × num + 3lwork<(nreg+3)×num+3.
      ifail = 3ifail=3
    The matrix XX is not full rank.
      ifail = 4ifail=4
    The information matrix is not positive definite.
      ifail = 5ifail=5
    The maximum number of iterations has been reached.
      ifail = 6ifail=6
    The log-likelihood cannot be optimized any further.
      ifail = 7ifail=7
    No feasible model parameters could be found.

    Accuracy

    Not applicable.

    Further Comments

    None.

    Example

    function nag_tsa_uni_garch_exp_estim_example
    num = 100;
    mn = 1;
    nreg = 2;
    
    % The series
    yt = [7.53; 6.64; 7.39; 7.15; 6.42; 6.32; 6.98; 7.09; 6.63; 6.93;
          7.01; 5.30; 7.86; 6.73; 7.39; 5.61; 7.02; 6.04; 7.46; 4.33;
          6.02; 6.37; 3.93; 7.24; 8.58; 5.70; 9.13; 7.99; 7.79; 6.13;
          8.78; 6.52; 6.79; 7.77; 7.31; 7.58; 8.78; 7.39; 8.00; 7.07;
          7.65; 9.15; 8.32; 7.32; 7.58; 9.78; 8.17; 9.26; 7.79; 7.03;
          7.45; 7.09; 8.06; 7.06; 9.91; 7.01; 8.32; 6.41; 8.59; 8.55;
          7.77; 8.04; 9.54; 8.28; 7.97; 8.42; 8.30; 7.98; 7.60; 8.77;
          7.54; 7.40; 9.26; 7.30; 9.33; 9.54; 8.08; 6.93; 4.27; 2.65;
          5.03; 0.91;12.63;10.87; 9.26; 8.30; 6.85; 7.48; 9.67; 9.54;
          7.33; 8.84; 7.75; 8.12; 7.29; 8.58; 7.80; 3.07; 9.33;16.91];
    
    % The exogenous variables
    x = [2.40, 0.12; 2.40, 0.12; 2.40, 0.13; 2.40, 0.14;
         2.40, 0.14; 2.40, 0.15; 2.40, 0.16; 2.40, 0.16;
         2.40, 0.17; 2.41, 0.18; 2.41, 0.19; 2.41, 0.19;
         2.41, 0.20; 2.41, 0.21; 2.41, 0.21; 2.41, 0.22;
         2.41, 0.23; 2.41, 0.23; 2.41, 0.24; 2.42, 0.25;
         2.42, 0.25; 2.42, 0.26; 2.42, 0.26; 2.42, 0.27;
         2.42, 0.28; 2.42, 0.28; 2.42, 0.29; 2.42, 0.30;
         2.42, 0.30; 2.43, 0.31; 2.43, 0.32; 2.43, 0.32;
         2.43, 0.33; 2.43, 0.33; 2.43, 0.34; 2.43, 0.35;
         2.43, 0.35; 2.43, 0.36; 2.43, 0.37; 2.44, 0.37;
         2.44, 0.38; 2.44, 0.38; 2.44, 0.39; 2.44, 0.39;
         2.44, 0.40; 2.44, 0.41; 2.44, 0.41; 2.44, 0.42;
         2.44, 0.42; 2.45, 0.43; 2.45, 0.43; 2.45, 0.44;
         2.45, 0.45; 2.45, 0.45; 2.45, 0.46; 2.45, 0.46;
         2.45, 0.47; 2.45, 0.47; 2.45, 0.48; 2.46, 0.48;
         2.46, 0.49; 2.46, 0.49; 2.46, 0.50; 2.46, 0.50;
         2.46, 0.51; 2.46, 0.51; 2.46, 0.52; 2.46, 0.52;
         2.46, 0.53; 2.47, 0.53; 2.47, 0.54; 2.47, 0.54;
         2.47, 0.54; 2.47, 0.55; 2.47, 0.55; 2.47, 0.56;
         2.47, 0.56; 2.47, 0.57; 2.47, 0.57; 2.48, 0.57;
         2.48, 0.58; 2.48, 0.58; 2.48, 0.59; 2.48, 0.59;
         2.48, 0.59; 2.48, 0.60; 2.48, 0.60; 2.48, 0.61;
         2.48, 0.61; 2.49, 0.61; 2.49, 0.62; 2.49, 0.62;
         2.49, 0.62; 2.49, 0.63; 2.49, 0.63; 2.49, 0.63;
         2.49, 0.64; 2.49, 0.64; 2.49, 0.64; 2.50, 0.64];
    
    % Details of the model to fit
    dist = 't';
    ip = 1;
    iq = 2;
    
    % Control parameters
    copts = true;
    maxit = int64(200);
    tol = 0.00001;
    
    % Initial parameter estimates
    theta = [0.05; -0.15; -0.05; 0.05; 0.15; 0.35; 3.25; 1.5; 0; 0];
    
    % Forecast horizon
    nt = 4;
    
    % Fit the GARCH model
    [theta, se, sc, covar, hp, et, ht, lgf, ifail] = ...
        nag_tsa_uni_garch_exp_estim(dist, yt, x, int64(ip), int64(iq), ...
           int64(nreg), int64(mn), theta, 0, copts, maxit, tol, 'ifail', int64(-1));
    
    % Calculate the volatility forecast
    [fht, ifail] = nag_tsa_uni_garch_exp_forecast(int64(nt), int64(ip), ...
                       int64(iq), theta, ht, et);
    
    % Output the results
    fprintf('\n               Parameter        Standard\n');
    fprintf('               estimates         errors\n');
    
    % Output the coefficient alpha_0
    fprintf('Alpha0 %16.2f%16.2f\n', theta(1), se(1));
    l = 2;
    
    % Output the coefficients alpha_i
    for i = l:l+iq-1
      fprintf('Alpha%d %16.2f%16.2f\n', i-1, theta(i), se(i));
    end
    l = l+iq;
    
    % Output the coefficients psi_i
    for i = l:l+iq-1
      fprintf('  Psi%d %16.2f%16.2f\n', i-l+1, theta(i), se(i));
    end
    l = l+iq;
    
    % Output the coefficients beta_j
    fprintf('\n');
    for i = l:l+ip-1
      fprintf(' Beta%d %16.2f%16.2f\n', i-l+1, theta(i), se(i));
    end
    l = l+ip;
    
    % Output the estimated degrees of freedom, df
    if (dist == 't')
      fprintf('\n    DF %16.2f%16.2f\n', theta(l), se(l));
      l = l + 1;
    end
    
    % Output the estimated mean term, b_0
    if (mn == 1)
      fprintf('\n    B0 %16.2f%16.2f\n', theta(l), se(l));
      l = l + 1;
    end
    
    % Output the estimated linear regression coefficients, b_i
    for i = l:l+nreg-1
      fprintf('    B%d %16.2f%16.2f\n', i-l+1, theta(i), se(i));
    end
    
    % Display the volatility forecast
    fprintf('\nVolatility forecast = %12.4f\n', fht(nt));
    
     
    
                   Parameter        Standard
                   estimates         errors
    Alpha0             0.17            0.20
    Alpha1            -0.64            0.29
    Alpha2            -0.44            0.25
      Psi1            -0.07            0.23
      Psi2             0.35            0.24
    
     Beta1             0.42            0.17
    
        DF             5.65            3.69
    
        B0           129.22           50.19
        B1           -51.94           21.18
        B2            13.06            3.83
    
    Volatility forecast =       1.3373
    
    
    function g13fg_example
    num = 100;
    mn = 1;
    nreg = 2;
    
    % The series
    yt = [7.53; 6.64; 7.39; 7.15; 6.42; 6.32; 6.98; 7.09; 6.63; 6.93;
          7.01; 5.30; 7.86; 6.73; 7.39; 5.61; 7.02; 6.04; 7.46; 4.33;
          6.02; 6.37; 3.93; 7.24; 8.58; 5.70; 9.13; 7.99; 7.79; 6.13;
          8.78; 6.52; 6.79; 7.77; 7.31; 7.58; 8.78; 7.39; 8.00; 7.07;
          7.65; 9.15; 8.32; 7.32; 7.58; 9.78; 8.17; 9.26; 7.79; 7.03;
          7.45; 7.09; 8.06; 7.06; 9.91; 7.01; 8.32; 6.41; 8.59; 8.55;
          7.77; 8.04; 9.54; 8.28; 7.97; 8.42; 8.30; 7.98; 7.60; 8.77;
          7.54; 7.40; 9.26; 7.30; 9.33; 9.54; 8.08; 6.93; 4.27; 2.65;
          5.03; 0.91;12.63;10.87; 9.26; 8.30; 6.85; 7.48; 9.67; 9.54;
          7.33; 8.84; 7.75; 8.12; 7.29; 8.58; 7.80; 3.07; 9.33;16.91];
    
    % The exogenous variables
    x = [2.40, 0.12; 2.40, 0.12; 2.40, 0.13; 2.40, 0.14;
      2.40, 0.14; 2.40, 0.15; 2.40, 0.16; 2.40, 0.16;
      2.40, 0.17; 2.41, 0.18; 2.41, 0.19; 2.41, 0.19;
      2.41, 0.20; 2.41, 0.21; 2.41, 0.21; 2.41, 0.22;
      2.41, 0.23; 2.41, 0.23; 2.41, 0.24; 2.42, 0.25;
      2.42, 0.25; 2.42, 0.26; 2.42, 0.26; 2.42, 0.27;
      2.42, 0.28; 2.42, 0.28; 2.42, 0.29; 2.42, 0.30;
      2.42, 0.30; 2.43, 0.31; 2.43, 0.32; 2.43, 0.32;
      2.43, 0.33; 2.43, 0.33; 2.43, 0.34; 2.43, 0.35;
      2.43, 0.35; 2.43, 0.36; 2.43, 0.37; 2.44, 0.37;
      2.44, 0.38; 2.44, 0.38; 2.44, 0.39; 2.44, 0.39;
      2.44, 0.40; 2.44, 0.41; 2.44, 0.41; 2.44, 0.42;
      2.44, 0.42; 2.45, 0.43; 2.45, 0.43; 2.45, 0.44;
      2.45, 0.45; 2.45, 0.45; 2.45, 0.46; 2.45, 0.46;
      2.45, 0.47; 2.45, 0.47; 2.45, 0.48; 2.46, 0.48;
      2.46, 0.49; 2.46, 0.49; 2.46, 0.50; 2.46, 0.50;
      2.46, 0.51; 2.46, 0.51; 2.46, 0.52; 2.46, 0.52;
      2.46, 0.53; 2.47, 0.53; 2.47, 0.54; 2.47, 0.54;
      2.47, 0.54; 2.47, 0.55; 2.47, 0.55; 2.47, 0.56;
      2.47, 0.56; 2.47, 0.57; 2.47, 0.57; 2.48, 0.57;
      2.48, 0.58; 2.48, 0.58; 2.48, 0.59; 2.48, 0.59;
      2.48, 0.59; 2.48, 0.60; 2.48, 0.60; 2.48, 0.61;
      2.48, 0.61; 2.49, 0.61; 2.49, 0.62; 2.49, 0.62;
      2.49, 0.62; 2.49, 0.63; 2.49, 0.63; 2.49, 0.63;
      2.49, 0.64; 2.49, 0.64; 2.49, 0.64; 2.50, 0.64];
    
    % Details of the model to fit
    dist = 't';
    ip = 1;
    iq = 2;
    
    % Control parameters
    copts = true;
    maxit = int64(200);
    tol = 0.00001;
    
    % Initial parameter estimates
    theta = [0.05; -0.15; -0.05; 0.05; 0.15; 0.35; 3.25; 1.5; 0; 0];
    
    % Forecast horizon
    nt = 4;
    
    % Fit the GARCH model
    [theta, se, sc, covar, hp, et, ht, lgf, ifail] = ...
        g13fg(dist, yt, x, int64(ip), int64(iq), int64(nreg), int64(mn), theta, 0, ...
              copts, maxit, tol, 'ifail', int64(-1));
    
    % Calculate the volatility forecast
    [fht, ifail] = g13fh(int64(nt), int64(ip), int64(iq), theta, ht, et);
    
    % Output the results
    fprintf('\n               Parameter        Standard\n');
    fprintf('               estimates         errors\n');
    
    % Output the coefficient alpha_0
    fprintf('Alpha0 %16.2f%16.2f\n', theta(1), se(1));
    l = 2;
    
    % Output the coefficients alpha_i
    for i = l:l+iq-1
      fprintf('Alpha%d %16.2f%16.2f\n', i-1, theta(i), se(i));
    end
    l = l+iq;
    
    % Output the coefficients psi_i
    for i = l:l+iq-1
      fprintf('  Psi%d %16.2f%16.2f\n', i-l+1, theta(i), se(i));
    end
    l = l+iq;
    
    % Output the coefficients beta_j
    fprintf('\n');
    for i = l:l+ip-1
      fprintf(' Beta%d %16.2f%16.2f\n', i-l+1, theta(i), se(i));
    end
    l = l+ip;
    
    % Output the estimated degrees of freedom, df
    if (dist == 't')
      fprintf('\n    DF %16.2f%16.2f\n', theta(l), se(l));
      l = l + 1;
    end
    
    % Output the estimated mean term, b_0
    if (mn == 1)
      fprintf('\n    B0 %16.2f%16.2f\n', theta(l), se(l));
      l = l + 1;
    end
    
    % Output the estimated linear regression coefficients, b_i
    for i = l:l+nreg-1
      fprintf('    B%d %16.2f%16.2f\n', i-l+1, theta(i), se(i));
    end
    
    % Display the volatility forecast
    fprintf('\nVolatility forecast = %12.4f\n', fht(nt));
    
     
    
                   Parameter        Standard
                   estimates         errors
    Alpha0             0.17            0.20
    Alpha1            -0.64            0.29
    Alpha2            -0.44            0.25
      Psi1            -0.07            0.23
      Psi2             0.35            0.24
    
     Beta1             0.42            0.17
    
        DF             5.65            3.69
    
        B0           129.22           50.19
        B1           -51.94           21.18
        B2            13.06            3.83
    
    Volatility forecast =       1.3373
    
    

    PDF version (NAG web site, 64-bit version, 64-bit version)
    Chapter Contents
    Chapter Introduction
    NAG Toolbox

    © The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013