Using gret l for Principles of Econometrics, 4th Edition

Threshold ARCH

Threshold ARCH (TARCH) can also be estimated in gretl, though it requires a little pro­gramming; there aren’t any pull-down menus for this estimator. Instead, we’ll introduce gretl’s powerful mle command that allows user defined (log) likelihood functions to be maximized.

The threshold ARCH model replaces the variance equation (14.3) with

ht = 5 + aief-! + Ydi-ief-! + Aht-i

The model’s parameters are estimated by finding the values that maximize its likelihood. Maximum likelihood estimators are discussed in appendix C of Hill et al. (2011).

Gretl provides a fairly easy way to estimate via maximum likelihood that can be used for a wide range of estimation problems (see chapter 16 for other examples). To use gretl’s mle command, you must specify the log-likelihood function that is to be maximized. Any parameters contained in the function must be given reasonable starting values for the routine to work properly. Parameters can be declared and given starting values (using the scalar command).

Numerical optimization routines use the partial derivatives of the objective function to itera­tively find the minimum or maximum of the function. If you want, you can specify the analytical derivatives of the log-likelihood function with respect to each of the parameters in gretl; if ana­lytical derivatives are not supplied, gretl tries to compute a numerical approximation. The actual results you obtain will depend on many things, including whether analytical derivatives are used and the starting values.

For the threshold GARCH model, open a new script file and type in the program that appears in Figure 14.7.

Lines 3-7 of the script give starting values for the model’s parameters. This is essential and picking good starting values increases the chances of success. You want to start the numerical optimization at a feasible point. In other words, you cannot start the model with a negative variance.

The second part of the script starting on line 9 contains the the algebraic expression of the log-likelihood function. Line 9 ll = -0.5*(log(h) + (e"2)/h) is what is called the kernel of the normal probability density function. Recall that the errors of the ARCH model are assumed to be normally distributed and this is reflected in the kernel.

Test for ARCH of order 1

coefficient std. error t-ratio p-value

alpha(0) 0.908262 0.124401 7.301 1.14Є-012 ***

alpha(1) 0.353071 0.0419848 8.410 4.39e-016 ***

Null hypothesis: no ARCH effect is present Test statistic: LM = 62.1595

with p-value = P(Chi-square(1) > 62.1595) = 3.16735e-015

Figure 14.5: ARCH test results

Figure 14.6: Plot of the variances after estimating the GARCH(1,1) using the BrightenYourDay returns. Right click on the graph to bring up the menu shown. Then choose edit to modify your graph.

Next, we have to specify an initial guess for the variances of the model, and these are set to the empirical variance of the series using var(r). Then, the errors are generated, squared, and the threshold term is created using series e2m = e2 * (e<0); the expression (e<0) takes the value of 1 for negative errors, e, and is zero otherwise. Then in line 14, the heteroskedastic function ht is specified. The parameters of the model are given at the end using the params statement. This is required since we are going to let gretl try to maximize this function using numerical derivatives. The mle loop is ended with end mle. The output appears in Figure 14.8. The coefficient estimates are very close to those printed in POE4, and the standard errors and corresponding t-ratios are fairly similar as well. It is not unusual for estimates produced by different software to produce this kind of variation when estimating nonlinear models numerically. Different pieces of software that no doubt use different algorithms were used to numerically maximize the log-likelihood function. What is amazing here is that gretl does such a fine job without having to specify the analytic derivatives of the log-likelihood. Very impressive.

Gretl offers a new set of functions that estimate various kinds of GARCH models. Choose Models^Time-series^GARCH variants from the pull-down menu to reveal the following dialog box:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

open "c:Program FilesgretldatapoeBYD. gdt

scalar mu = 0.5 scalar omega = .5 scalar alpha = 0.4 scalar delta = 0.1 scalar beta = 0

mle ll = -0.5*(log(h) + (e~2)/h) series h = var(r) series e = r - mu series e2 = ert2 series e2m = e2 * (e<0)

series h = omega + alpha*e2(-1) + delta*e2m(-1) + beta*h(-1) params mu omega alpha delta beta end mle

Figure 14.7: Threshold GARCH script

Using numerical derivatives Tolerance = 1.81899Є-012 Function evaluations: 72 Evaluations of gradient: 19

Model 1: ML, using observations 1-500 11 = -0.5"(log(і) + (e~2}/h)

Standard errors based on Outer Products matrix

estimate

std. error

z

p-value

mu

0 . ЭЭ5256

0.042 9403

23.18

7.70Є-119

ft ft ft

omega

0.356064

0.0900963

3.952

7.75Є-05

* * *

alpha

0.263232

0.0805990

3.2 67

0.0011

ft**

delta

0.490534

0.204453

2.399

0.0164

* *

beta

0.286870

0.115478

2.434

0.0130

ft ft

The GJR model type is actually equivalent to the TARCH discussed above. Estimating it with the OPG covariance estimator yields very similar results to the ones in POE4. This module offers several other variants of GARCH, but you will have to use the gretl documentation to be sure of what you are estimating. For instance, the TARCH option is not the same as the one in POE4.

Model: GJR(1,1) [Glosten et al.] (Normal)*

Dependent variable: r

Sample: 1-500 (T = 500), VCV method: OPG Conditional mean equation

coefficient std. error z p-value

const 0.995450 0.0429312 23.19 6.15e-119 ***

Conditional variance equation

coefficient std. error z p-value

omega

0.356106

0.0900902

3.953

-4

CO

CD

1

О

СЛ

***

alpha

0.476221

0.102614

4.641

3.47e-06

***

gamma

0.256974

0.0873509

2.942

0.0033

***

beta

0.286913

0.115495

2.484

0.0130

**

(alt. parametrization) coefficient

std. error

z

p-value

delta

0.356106

0.0900902

3.953

-4

CO

CD

1

О

СЛ

***

alpha

0.262915

0.0804612

3.268

0.0011

***

gamma

0.489506

0.203966

2.400

0.0164

**

beta

0.286913

0.115495

2.484

0.0130

**

Llik:

-730.58891

AIC:

1471

17783

BIC:

1492.25087

HQC:

1479

44686

You notice that a and у refer to two different ways to parameterize the model. The alternative refers to the TARCH model discussed in POE4.

Добавить комментарий

Using gret l for Principles of Econometrics, 4th Edition

Simulation

In appendix 10F of POE4, the authors conduct a Monte Carlo experiment comparing the performance of OLS and TSLS. The basic simulation is based on the model y = x …

Hausman Test

The Hausman test probes the consistency of the random effects estimator. The null hypothesis is that these estimates are consistent-that is, that the requirement of orthogonality of the model’s errors …

Time-Varying Volatility and ARCH Models: Introduction to Financial Econometrics

In this chapter we’ll estimate several models in which the variance of the dependent variable changes over time. These are broadly referred to as ARCH (autoregressive conditional heteroskedas - ticity) …

Как с нами связаться:

Украина:
г.Александрия
тел./факс +38 05235  77193 Бухгалтерия

+38 050 457 13 30 — Рашид - продажи новинок
e-mail: msd@msd.com.ua
Схема проезда к производственному офису:
Схема проезда к МСД

Партнеры МСД

Контакты для заказов оборудования:

Внимание! На этом сайте большинство материалов - техническая литература в помощь предпринимателю. Так же большинство производственного оборудования сегодня не актуально. Уточнить можно по почте: Эл. почта: msd@msd.com.ua

+38 050 512 1194 Александр
- телефон для консультаций и заказов спец.оборудования, дробилок, уловителей, дражираторов, гереторных насосов и инженерных решений.