Note: the interface to this routine has changed since earlier releases of the toolbox:
At Mark 25: |
nreg was made optional |
A univariate regression-GJR
process, with
coefficients
, for
,
coefficients
, for
, and
linear regression coefficients
, for
, can be represented by:
where
, if
,
, if
, and
or
. Here
is a standardized Student's
-distribution with
degrees of freedom and variance
,
is the number of terms in the sequence,
denotes the endogenous variables,
the exogenous variables,
the regression mean,
the regression coefficients,
the residuals,
is the conditional variance, and
the set of all information up to time
.
Note: if the
, where
is known (not to be estimated by
nag_tsa_uni_garch_gjr_estim (g13fe)) then
(1) can be written as
, where
. This corresponds to the case
No Regression and No Mean, with
replaced by
.
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
Not applicable.
None.
function g13fe_example
fprintf('g13fe example results\n\n');
mn = int64(1);
nreg = int64(2);
yt = [7.23; 6.75; 7.21; 7.08; 6.60;
6.59; 7.00; 7.06; 6.82; 6.99;
7.05; 6.12; 7.47; 6.99; 7.26;
6.42; 7.12; 6.77; 7.32; 6.03;
6.78; 7.04; 6.27; 7.30; 7.71;
6.62; 8.13; 7.69; 7.62; 6.64;
8.16; 6.95; 7.15; 7.61; 7.42;
7.56; 8.25; 7.43; 7.84; 7.24;
7.63; 8.45; 8.17; 7.40; 7.62;
8.89; 8.14; 8.90; 7.79; 7.19;
7.55; 7.41; 7.93; 7.43; 8.87;
7.27; 8.09; 7.15; 8.21; 8.19;
7.84; 7.99; 8.90; 8.24; 7.97;
8.30; 8.23; 7.98; 7.73; 8.50;
7.71; 7.70; 8.61; 7.68; 8.66;
8.85; 8.09; 7.45; 6.15; 6.28;
7.59; 6.78; 9.32; 9.16; 8.77;
8.27; 7.24; 7.73; 9.01; 9.09;
7.55; 8.64; 7.97; 8.20; 7.72;
8.47; 8.06; 5.55; 8.75; 10.15];
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];
dist = 't';
ip = int64(1);
iq = int64(1);
copts = [true; true];
maxit = int64(200);
tol = 0.00001;
hp = 0;
theta = [0.025; 0.05; 0.4; 0.045; 3.25; 1.5; 0; 0];
nt = int64(4);
[theta, se, sc, covr, hp, et, ht, lgf, ifail] = ...
g13fe( ...
dist, yt, x, ip, iq, mn, theta, hp, copts, maxit, tol);
gamma = theta(4);
[fht, ifail] = g13ff( ...
nt, ip, iq, theta, gamma, ht, et);
fprintf('\n Parameter Standard\n');
fprintf(' estimates errors\n');
fprintf('Alpha0 %16.2f%16.2f\n', theta(1), se(1));
l = 2;
for i = l:l+iq-1
fprintf('Alpha%d %16.2f%16.2f\n', i-1, theta(i), se(i));
end
l = l+iq;
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;
fprintf('\n Gamma %16.2f%16.2f\n', theta(l), se(l));
l = l+1;
if (dist == 't')
fprintf('\n DF %16.2f%16.2f\n', theta(l), se(l));
l = l + 1;
end
if (mn == 1)
fprintf('\n B0 %16.2f%16.2f\n', theta(l), se(l));
l = l + 1;
end
for i = l:l+nreg-1
fprintf(' B%d %16.2f%16.2f\n', i-l+1, theta(i), se(i));
end
fprintf('\nVolatility forecast = %12.2f\n', fht(nt));