Expert Systems with Applications 41 (2014) 3323–3332
Contents lists available at ScienceDirect
Expert Systems with Applications journal homepage: www.elsevier.com/locate/eswa
Estimation and forecasting with logarithmic autoregressive conditional duration models: A comparative study with an application K.H. Ng a,⇑, Shelton Peiris b, Richard Gerlach c a
Institute of Mathematical Sciences, Faculty of Science, University of Malaya, Lembah Pantai, Kuala Lumpur 50603, Malaysia School of Mathematics and Statistics F07, The University of Sydney, NSW 2006, Australia c Discipline of Business Analytics, The University of Sydney, Business School, NSW 2006, Australia b
a r t i c l e Keywords: Duration data Conditional duration Log-ACD Estimating function Maximum likelihood
i n f o
a b s t r a c t This paper presents a semi-parametric method of parameter estimation for the class of logarithmic ACD (Log-ACD) models using the theory of estimating functions (EF). A number of theoretical results related to the corresponding EF estimators are derived. A simulation study is conducted to compare the performance of the proposed EF estimates with corresponding ML (maximum likelihood) and QML (quasi maximum likelihood) estimates. It is argued that the EF estimates are relatively easier to evaluate and have sampling properties comparable with those of ML and QML methods. Furthermore, the suggested EF estimates can be obtained without any knowledge of the distribution of errors is known. We apply all these suggested methodology for a real financial duration dataset. Our results show that Log-ACD (1, 1) fits the data well giving relatively smaller variation in forecast errors than in Linear ACD (1, 1) regardless of the method of estimation. In addition, the Diebold–Mariano (DM) and superior predictive ability (SPA) tests have been applied to confirm the performance of the suggested methodology. It is shown that the new method is slightly better than traditional methods in practice in terms of computation; however, there is no significant difference in forecasting ability for all models and methods. Ó 2013 Elsevier Ltd. All rights reserved.
1. Introduction Modelling of high frequency financial data is an important issue in studies related to market mirco-structure theories and liquidity problems. Engle and Russell (1997, 1998) proposed the class of autoregressive conditional duration (ACD) models to analyze irregularly spaced high frequency data on durations between successive financial market trades. This class adapts the theory and approach of auto-regressive moving average (ARMA) and GARCH models to analyze transaction data with irregular time intervals and to study the dynamics of the corresponding durations. Thus the evolution of the class of ACD model specifications mirrors that of GARCH models. Engle and Russell (1997) used IBM transactions data to fit an ACD model with a linear specification. Dufour and Engle (2000) pointed out that the linear specification is perhaps too restrictive in practice. Since that time, many alternative nonlinear ACD models have been proposed. For example: Bauwens and Giot (2000) proposed the class of Logarithmic ACD (Log-ACD) models, Dufour and Engle (2000) introduced the Box–Cox ACD (BCACD) and Exponential ACD (EXPACD) models, while Zhang, Russell, and Tsay (2001) proposed a Threshold ACD (TACD) models. More recent developments in this ⇑ Corresponding author. Tel.: +60 12 4782722; fax: +60 379674143. E-mail addresses:
[email protected] (K.H. Ng),
[email protected] (S. Peiris),
[email protected] (R. Gerlach). 0957-4174/$ - see front matter Ó 2013 Elsevier Ltd. All rights reserved. http://dx.doi.org/10.1016/j.eswa.2013.11.024
area can be found in Bauwens and Giot (2003) – asymmetric ACD model; Bauwens and Veredas (2004) – stochastic conditional duration (SCD) model; Fernandes and Grammig (2006) – augmented autoregressive conditional duration (AACD) model; and Meitz and Terasvirta (2006) – smooth-transition threshold (ST-) ACD model. Useful and informative reviews on various ACD models with applications can be found in Pacurar (2008) and Hautsch (2012). If the parameters of the specified ACD model are not well estimated, then it may not adequately describe the behavior of the process and hence lead to inaccurate forecast values. One of the drawbacks in estimation is the identification of a suitable density from the family of distributions with positive support such as: Burr, exponential, generalized gamma, generalized F or log-normal. Once the distribution is known or well-approximated, the best method of estimation is the maximum likelihood (ML) procedure. Another alternative parametric approach in parameter estimation is known as the quasi maximum likelihood (QML) that has been widely used. For example, Engle and Russell (1997, 1998), Bauwens and Giot (2000), Dufour and Engle (2000), Zhang et al. (2001), Bauwens and Veredas (2004), Fernandes and Grammig (2006), Meitz and Terasvirta (2006), Allen, Chan, McAleer, and Peiris (2008), Allen, Lazarov, McAleer, and Peiris (2009), Liu and Maheu (2012) and Pyrlik (2013). Semi-parametric estimation is very popular in econometrics and statistics since in general for continuous valued variables the
3324
K.H. Ng et al. / Expert Systems with Applications 41 (2014) 3323–3332
true distribution of the data is not known, while semi-parametric estimation can be robust to many possible distributions. However, in the financial time series modeling literature likelihood-based methods have dominated, partly because least squares methods are highly sensitive to the outliers that are common in financial data. An alternative semi-parametric approach, based on the method of estimating functions (EF) suggested by Godambe (1985), has been successfully applied to the class of linear ACD (LINACD) model by Peiris, Ng, and Mohamed (2007), Pathmanathan, Ng, and Peiris (2009), Allen, Ng, and Peiris (2013a, 2013b) and Ng and Peiris (2013). Other applications of EF to time series models include Thavaneswaran and Peiris (1996), David and Turtle (2000) and Bera and Bilias (2002). A comprehensive discussion on both concepts of estimating function and its applications in financial time series can be found in Bera, Bilias, and Simlai (2006). The class of Log-ACD models has been suggested in literature as an alternative to LINACD, due to its flexibility in applications and it removes any positivity restrictions on parameters. It has shown that the Log-ACD model is preferable and superior to LINACD model in many applications. See, for example, Bauwens and Giot (2000, 2003), Bauwens, Giot, Grammig, and Veredas (2004), Bauwens, Galli, and Giot (2008) and Allen et al. (2008, 2009). The aim of this paper is to extend the EF approach for parameter estimation in the class of non-linear ACD models with focus on Log-ACD. Since, this approach requires information from only the first two moments of the distribution, instead of the full distribution, it serves as a semi-parametric method of parameter estimation. In order to assess and compare the performance of estimation methods the EF, ML and QML, a simulation study is carried out including various options for the conditional distribution. Finally, we fit the IBM data given in Tsay (2010, pp. 260–264) employing both the Log-ACD and LINACD models using the suggested estimation methods. The predictive performances of these models based on each method are investigated and compared for forecast accuracy using two tests, namely, the DM test (Diebold & Mariano, 1995) and SPA test (Hansen, 2005). In order to report the contributions, this paper is organized as follows: Section 2 reviews the general class of ACD models including LINACD (p, q) and Log-ACD (p, q) models. Section 3 reviews and discusses the estimating methods, namely EF, ML and QML in detail. Further, some important statistical properties of the EF estimators for the Log-ACD model are derived following Allen, Ng, and Peiris (2013a). Section 4 presents the simulation results. Section 5 discusses the model comparison and forecasting. In the Section 6, an empirical example using the data given in Tsay (2010, pp. 260–264) has been reported by fitting Log-ACD and LINACD models. The predictive performances of these models from different estimation methods are measured and compared. Two tests: the DM test (Diebold & Mariano, 1995) and SPA test (Hansen, 2005) are carried out to assess the comparative forecast accuracy across models and estimators. The Section 7 concludes the paper. 2. The general class of ACD models
is independent of Fi1. Drost and Werker (2004) consider a semiparametric estimation approach; however, most estimators for ACD type models assume a parametric form for f(): e.g. ML and QML. The basic class of ACD specification, known as LINACD (p, q) as proposed by Engle and Russell (1998), is defined via:
wi ¼ x þ
p X
q X bj wij ;
j¼1
j¼1
aj xij þ
where x > 0, aj, bj > 0 and
ð1Þ
where Fi1 is the information set available at (i 1)-th trade. Then, the basic ACD model for the variable xi is defined multiplicatively, via:
xi ¼ wi ei ;
ðaj þ bj Þ < 1, p P 1, q P 0 and
r = max (p, q). This dynamic equation closely resembles the GARCH (p, q) specification from Bollerslev (1986). 2.2. Log-ACD model Define wi as the logarithm of the conditional expectation of xi, so that:
wi ¼ ln E½xi jxi1 ; xi2 ; . . . ; x1 ¼ ln E½xi jF i1 ;
ð4Þ
where Fi1 is the information set available at the (i 1)th trade. Then, the Log-ACD (p, q) model is defined by:
xi ¼ ewi ei ; wi ¼ x þ
ð5Þ p X
q X bk wik :
j¼1
k¼1
aj lnðxij Þ þ
ð6Þ
There are no positivity restrictions required on the parameters
x, aj and bj in wi, since ewi > 0 guarantees xi > 0. Analytical expressions for some moments of Log-ACD models can be found in Bauwens, Galli, and Giot (2008). Section 3 now reviews the EF, ML and QML estimation methods for the class of Log-ACD models. 3. Parameter estimation This section first reviews the theory of EF, then considers this method as an alternative in parameter estimation of Log-ACD models. We then use an example of the Log-ACD (1, 1) model to illustrate the EF method. Finally, we present the likelihood functions for Log-ACD models under the ML and QML approaches. See Pathmanathan et al. (2009) and Allen et al. (2013a, 2013b) for the use of EF method in LINACD models. 3.1. The EF method Suppose that {x1, x2, . . ., xn} is an observed discrete-time stochastic process. We are interested of fitting a suitable model for a sample of size n from this process. Let H be a class of probability distributions F on Rn and h = h(F), F e H be a vector of real parameters. Then, assume hi() is a real valued function of x1, x2, . . ., xi and h such that:
ði ¼ 1; 2; . . . ; n; F 2 HÞ;
ð7Þ
and
Let ti be the time of the i-th trading transaction and let xi be the i-th adjusted duration such that xi = ti ti1. Let
wi ¼ E½xi jxi1 ; xi2 ; . . . ; x1 ¼ E½xi jF i1 ;
r P
j¼1
Ei1 ðhi ðÞÞ ¼ 0; 2.1. LINACD model
ð3Þ
ð2Þ
where the error term ei is a sequence of iid non-negative random variables (rvs), with density function f(), such that E(ei) = 1 and ei
Eðhi hj Þ ¼ 0; ði–jÞ;
ð8Þ
where Ei1,F() denotes the expectation holding the first i 1 values x1, x2, . . ., xi1 fixed and Ei1,F( ) Ei1, E0,F( ) EF( ) E( ) (unconditional mean) and hi = hi( ). Any real valued function g(x; h), of the random vector x = {x1, x2, . . ., xn} and the parameter h, that can be used to estimate h is called an estimating function (EF). Under standard regularity conditions (see e.g. Godambe, 1985), the function g(x; h) satisfying E[g(x; h)] = 0 is called a regular unbiased estimating function.
3325
K.H. Ng et al. / Expert Systems with Applications 41 (2014) 3323–3332
Following Godambe (1960) and Godambe and Thompson (1978, 1984), an optimal estimate of h must satisfy:
Eðhi hj Þ ¼ E½Efðxi ewi Þðxj ewj Þjx1 ; x2 ; . . . ; xj1 g ¼ E E xi xj xi ewj ewi xj þ ewi ewj jx1 ; x2 ; . . . ; xj1 ¼ E½Eðxi xj jx1 ; x2 ; . . . ; xj1 Þ E½ewj Eðxi jx1 ; x2 ; . . . ; xj1 Þ
(i) the values of g(x; h) are clustered around 0, as much as pos sible (i.e. E g 2 ðx; hÞ should be as small as possible); (ii) it is desirable that E[g(x; h + dh)], d > 0, should be as far away from 0 as possible. This is conveniently translated as
E½ewi Eðxj jx1 ; x2 ; . . . ; xj1 Þ þ Eðewi ewj Þ ¼ E½xi Eðxj jx1 ; x2 ; . . . xj1 Þ Eðewj xi Þ Eðewi ewj Þ þ Eðewi ewj Þ ¼ Eðxi ewj Þ Eðewj xi Þ Eðewi ewj Þ þ Eðewi ewj Þ ¼ 0:
Eð½@gðx;hÞ Þ should be as large as possible. @h Therefore, among all regular unbiased EFs g(x; h), g⁄(x; h) is said to be optimum if:
2 @gðx; hÞ E g 2 ðx; hÞ ; E @h
ð9Þ
Thus, hi is an unbiased and mutually orthogonal estimating function. The corresponding ai1 is given by
ai1 ¼ Ei1
g ðx; hÞ ¼
n X gðx; hÞ ¼ hi ai1 ;
Ei1
n X i¼1
2
Ei1 ½hi ¼ Ei1
@hi @h
r2e e2wi :
1 @hi xi ewi ; E i1 2 2w i re e @h
where
! q X @wij @hi ; ¼ ewi 1 þ bj @x @x j¼1
! q X @wij @hi wi ¼ e ln xil þ bj @ al @ al j¼1
i¼1
Eðgðx; hÞÞ ¼ 0;
@hi @h
Using the Theorem, the corresponding optimal EF’s for the Log-ACD (p, q) models can now be written as:
is minimized for all F e H at g(x; h) = g⁄(x; h). An optimal estimate h is obtained by solving the optimum estimating equation(s) so that g⁄(x; h) = 0. Linear unbiased estimating functions Consider the class of linear unbiased estimating functions L formed by
where hi are as defined in Eqs. (7) and (8) and ai1 is a suitably chosen function of the random variates x1, x2, . . ., xi1 and the parameter h for all i = 1, 2, . . ., n . Clearly,
Ei1
and
gðx; hÞ 2 L:
! q X @wij @hi ¼ ewi wik þ bj @bk @bk j¼1
Now we state the following theorem due to Godambe (1985):
Ei1
Theorem. In the class L of linear unbiased estimating functions g(x; h), the function g⁄(x; h) minimizing Eq. (9) is given by
for all 1 6 l 6 p and 1 6 k 6 q. The estimates ^ h can be obtained by solving the system of nonlinear equations given by g⁄(x; h) = 0.
g ðx; hÞ ¼
n X
hi ai1 ;
where ai1 ¼ Ei1
i¼1
@hi 2 Ei1 ½hi : @h
An optimal estimate of h (in the sense of Godambe, 1985) can be obtained by solving the equation(s) g⁄(x; h) = 0. The EF method in estimating parameters of Log-ACD (p, q) models is now discussed. 3.1.1. Estimation of Log-ACD model using the EF method Consider the Log-ACD (p, q) models given by wi
xi ¼ e
p X
q X bk wik ;
j¼1
k¼1
aj lnðxij Þ þ
where x, aj and bk are parameters and {ei} is a sequence of iid positive random variables such that E(ei) = 1 and r2e ¼ Varðei Þ. The mean and variance of the conditional distribution of xi are respectively: li ¼ ewi and r2i ¼ r2e e2wi . That is,
xi jF i1 f ewi ; r2e e2wi ;
where f is the common distributional form for {ei}. In order to construct the EF estimates for Log-ACD (p, q) models, define hi ¼ xi ewi . Now it is easy to verify that hi is an unbiased function and satisfies the two conditions given by Eqs. (7) and (8):
Ei1 ðhi Þ ¼ E xi ewi jx1 ; x2 ; . . . ; xi1
¼ E ewi jx1 ; x2 ; . . . ; xi1 E ewi jx1 ; x2 ; . . . ; xi1 ¼ 0 For i < j,
n X
1 @hi xi e w i ; Ei1 2w i e @ x i¼1
g 1 ¼
ei ;
wi ¼ x þ
3.1.2. An illustration As an illustration, consider the Log-ACD (1, 1) model given in Eqs. (5) and (6), where x, a1 and b1 are the parameters and assume that {ei} follows the standard exponential distribution with E(ei) = 1 and r2e ¼ 1. Using the Theorem, the corresponding optimal EF’s for the exponential Log-ACD (1, 1) model can now be written as
g 2 ¼
n X
1 @hi xi ewi ; Ei1 2w i e @ a 1 i¼1
and
n X
1 @hi xi ewi ; E 2wi i1 @b e 1 i¼1
g 3 ¼
where
Ei1
@hi @w @hi @w ¼ ewi 1 þ b1 i1 ; Ei1 ¼ ewi lnxi1 þ b1 i1 ; @x @x @ a1 @ a1
and
Ei1
@hi @w ¼ ewi wi1 þ b1 i1 : @b1 @b1
^1 Þ can be obtained by solving the ^ ¼ ðx ^;a ^1; b The estimates h above nonlinear equations for g 1 ¼ 0, g 2 ¼ 0 and g 3 ¼ 0. The asymptotic variance–covariance matrix of the parameter ^1 Þ containing the EFs for the exponential Log-ACD ^ ^;a ^1 ; b h ¼ ðx (1, 1) model may be written as the 3 by 3 matrix V1, where
3326
K.H. Ng et al. / Expert Systems with Applications 41 (2014) 3323–3332
2
V 13
3
V 11 6 V ¼ 4 V 21
V 12 V 22
7 V 23 5;
V 31
V 32
V 33
ð10Þ
f1 ðei Þ ¼ expðei Þ:
and has elements given by
V 11
X 2 n @g 1 @wi ¼ ¼E F ; i1 @x @x i¼1 n X @wi @wi ; ¼ @ x @ a1 i¼1
Likelihood function:
@g 1 ¼E F i1 @ a1
V 12 ¼ V 21
X n @g 1 @wi @wi ; V 13 ¼ V 31 ¼ E F i1 ¼ @b1 @ x @b1 i¼1 2 n X @wi ¼ ; @ a1 i¼1
LðxÞ ¼
lðxÞ ¼ @g 2 V 22 ¼ E F i1 @ a1
(b) Standardized Weibull distribution Log-ACD models with parameter c > 0 Density function:
Likelihood function:
LðxjcÞ ¼
c c1 c
n Y c 1 xi 1 xi : C 1 þ exp C 1 þ ewi c ewi c ewi i¼1
Log likelihood function: c
n x X 1 c 1 xi i lðxjcÞ ¼ c ln C 1 þ þ ln þ c ln w C 1 þ : c xi e i c ewi i¼1
@wi @w @wi @w and ¼ 1 þ b1 i1 ; ¼ ln xi1 þ b1 i1 @x @x @ a1 @ a1 @wi @w ¼ wi1 þ b1 i1 : @b1 @b1
When c = 1, the log-likelihood function for Weibull distribution Log-ACD models reduce to that of exponential Log-ACD models.
The diagonal entries of V1 give the sampling variances of the ^1 Þ. The finite sample distribution ^;a ^1; b parameter estimates ^ h ¼ ðx ^1 Þ is conjectured to approximately follow a Gaussian ^;a ^1 ; b of ^ h ¼ ðx distribution, i.e. we conjecture that there is a central limit theorem such that, approximately:
^h Nðh; V 1 Þ: This property is reflected in the histograms in the appendix (Figs. 4–9). Below, we briefly state the associated results for ML and QML estimations in order to proceed with calculations. 3.2. A review of ML and QML methods In the literature, the parameters of various ACD specifications are estimated by ML and QML methods. Let lðkÞ be the log-likelihood function with parameter vector k so that
log f ðxi ; kÞ;
n X 1 xi ln w w e i e i i¼1
f2 ðei Þ ¼ c½Cð1 þ 1=cÞc eic1 exp ½Cð1 þ 1=cÞei c :
where
lðkÞ ¼
n x Y 1 i f w exp w g i e e i i¼1
Log-likelihood function:
X n @g 2 @wi @wi ¼ and V 23 ¼ V 32 ¼ E F i1 @b1 @ a1 @b1 i¼1 X 2 n @g 3 @wi F ; ¼ V 33 ¼ E i1 @b1 @b1 i¼1
T X
(a) Standardized exponential distribution Log-ACD models Density function:
4. A simulation study A large scale simulation study has been carried out to compare the performance of the EF, ML and QML estimators for the Log-ACD (1, 1) models. The data are generated, separately, using the exponential and Weibull distributions in each case. Let ^ h be an estimator of the parameter vector h. Data is replicated N times from the Log-ACD (1, 1) models, under each error distribution, giving N such estimate vectors. We calculate the following statistics: ^ ^ ¼ 1 PN h (i) Mean, h i¼1 N ^ rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi (ii) Bias = h h 2ffi PN ^ 1 ^ h (iii) Standard Deviation, (SD) = N1 h i¼1 rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2 P ^ h (iv) Root Mean Square Error, ðRMSEÞ ¼ 1 N h N
i¼1
The simulation study is carried out separately for sample sizes n = 500 and n = 2000, with replications N = 2000 in each case from:
ð11Þ
ð12Þ
(a) Log-ACD (1, 1): wi = 0.01 + 0.20 ln(xi1) + 0.70wi1 (x = 0.01, a1 = 0.20, b1 = 0.70 and w1 = 0.50), and (b) Log-ACD (1, 1): wi = 0.10 0.20 ln(xi1) + 0.50wi1 (x = 0.10, a1 = 0.20, b1 = 0.50 and w1 = 0.50).
Note that the log-likelihood function in each case is given by Eq. (11) with f ðei ; kÞ replaced by the appropriate density function. However, in practice, the true distribution of ei is seldom known, and the ^ as defined in Eq. (12) will be corresponding estimator such that k, the QML estimator rather than the ML estimator. In this paper, we present two innovation distributions: standardized exponential and standardized Weibull. The corresponding density functions, likelihood functions and log-likelihood functions for Log-ACD models are shown below:
Results are shown in Tables 1–4. All estimation results are based on assuming the exponential distribution. Tables 1–3 show that, as expected, when the true distribution is correctly assumed, the ML estimates have slightly smaller (estimated) RMSE than the EF method, except for x in Table 1; this holds for n = 500 only. At n = 2000, which is still a small sample size for this sort of data, Tables 2 and 4 show that the RMSE is directly comparable and very close to the same between the ML and EF estimators. In all cases the average estimates themselves are very close to the true values
i¼1
^ of k where f is the conditional density function. The ML estimator, k, is given by
^ ¼ arg maxlðkÞ: k k2K
3327
K.H. Ng et al. / Expert Systems with Applications 41 (2014) 3323–3332
1000 Frequency
800 600 400 200
40.48349153
36.81035593
33.13722034
29.46408475
25.79094915
22.11781356
18.44467797
14.77154237
11.09840678
7.425271186
3.752135593
0.079
0
adj-dur Fig. 2. The histogram of the adjusted series.
0.8
1.0
Adjusted series
ACF 0.4 0.6
5. Model comparison
1200
0.2
and highly similar, as is their associated bias similar and negligible. At n = 2000, either of EF or ML could be recommended for estimation, whilst ML is marginally favored over EF when n = 500 only, in the case of the exponential error Log-ACD model. When the true distribution is Weibull, but an exponential is assumed in EF and to get QML estimates, very similar results are obtained. Bias is negligible in all cases. Once again, at n = 2000, either of EF or ML could be recommended for estimation, whilst ML is more clearly favored over EF when n = 500 only, in the case of the Weibull error Log-ACD model. It is important to note that the EF method requires on average 1.8210 s in Core i5 1.6 GHz computer to obtain a solution, while the ML method requires on average 3.3637 s to maximize the log-likelihood. To obtain the finite sample standard deviations from the matrix V given in Eq. (10), we first generate a sample of size n = 2000 from the Log-ACD (1, 1) model with exponential errors. We next find the matrix V and calculate the finite sample standard deviations from the diagonal elements of V1. The averages of such sample standard deviations are obtained through N = 2000 replications. Using the same set of parameters as in (a) with n = 2000, compute the finite sample standard deviations for x, a1 and b1. They are 0.0146, 0.0135 and 0.0228, respectively. These results are close to the estimated standard deviations shown in Table 2. The corresponding results for the parameter values in (b) are 0.0219, 0.0176 and 0.0644, respectively. Compare the values in Table 4 for the parameter set as in (b).
0.0
To compare the predictive performance of these models, we calculate the in-sample mean square prediction error (MSPE), insample mean absolute prediction deviation (MAPD), out-of-sample mean square forecast error (MSFE) and out-of-sample mean absolute forecast deviation (MAFD). Further, the pair-wise test of equal forecast accuracy that is DM test is carried out. The SPA test is also applied for comparing the forecast accuracy jointly among the competing models. Some brief discussions of these tests are given below.
0
10
20
30
Lag Fig. 3. ACF of the adjusted series.
5.1. Diebold–Mariano (DM) test Suppose that we have a time series xt; t = 1, 2, . . ., n + m of adjusted durations, where a model is fitted using the first n ð1Þ ð2Þ observations. Let ^ xt and ^ xt be the fitted values through LINACD (1, 1) and Log-ACD (1, 1) models. The forecast errors from the two models are
40
adj-dur
30
20
10
^ obtained by EF method when the true distribution Fig. 4. The histogram for the x follows exponential distribution (x = 0.01, n = 2000, N = 2000).
0 0
500
1000
1500 2000 sequence
2500
3000
3500
Fig. 1. Time plots of durations for US IBM stock traded in the first five trading days of November 1990: the adjusted series.
^ð1Þ eð1Þ h ¼ 1; 2; . . . ; m; nþh ¼ xnþh xnþh ; and
^ð2Þ eð2Þ h ¼ 1; 2; . . . ; m: nþh ¼ xnþh xnþh ;
3328
K.H. Ng et al. / Expert Systems with Applications 41 (2014) 3323–3332
The accuracy of each forecast is measured by a suitable loss funcðiÞ
tion, Lðenþh Þ, i = 1, 2. Two popular loss functions are square error loss and absolute deviation error loss, ðiÞ
2
ðiÞ
5.2. Superior predictive ability (SPA) test
Square error loss: Lðenþh Þ ¼ ðenþh Þ , Absolute deviation loss: Lðe
ðiÞ nþh Þ
¼ je
approximately standard normal. See for example, Diebold and Mariano (1995).
ðiÞ nþh j.
The DM test statistic evaluates the forecasts in terms of an arbitrary loss function L( ):
Pm ð1Þ ð2Þ =m h¼1 L enþh L enþh qffiffiffiffiffiffiffiffiffiffiffiffi ; DM ¼ S2 =m ð1Þ ð2Þ where S2 is an estimator of the variance of dh ¼ L enþh L enþh . Under the null hypothesis, the distribution of the DM statistic is
^ 1 obtained by EF method when the true distribution Fig. 5. The histogram for the a follows exponential distribution (a1 = 0.20, n = 2000, N = 2000).
^1 obtained by EF method when the true distribution Fig. 6. The histogram for the b follows exponential distribution (b1 = 0.70, n = 2000, N = 2000).
Hansen (2005) proposed the joint test for superior predictive ability (SPA) to allow comparisons across a range of models against a benchmark models. This test uses a particular loss function, e.g. mean square error (MSE) or mean absolute deviation (MAD) and tests whether a benchmark has a significantly lower expected loss than a range of competing models (k models). Under a general loss ðiÞ measure L enþh , where i indicate each of competing forecast models and the benchmark model i = 0, Hansen (2005) considered the ð0Þ ðiÞ loss comparisons di;h ¼ L enþh L enþh , i = 1, 2, . . ., k. These were placed into a vector, containing each model’s loss compared to the benchmark, and a test was developed that the average of this vector ld satisfies the hypothesis ld 6 0, in which case the benchmark model is jointly superior to all of the other models considered. We
^ obtained by EF method when the true distribution Fig. 7. The histogram for the x follows exponential distribution (x = 0.1, n = 2000, N = 2000).
^ 1 obtained by EF method when the true distribution Fig. 8. The histogram for the a follows exponential distribution (a1 = 0.20, n = 2000, N = 2000).
3329
K.H. Ng et al. / Expert Systems with Applications 41 (2014) 3323–3332
employed the studentized version of the test, with the test statistic:
T¼
pffiffiffiffiffi m max
" max
i¼1;2;...;k
d i
xi
# ;0 ;
i is the sample average of the loss comparisons d for model where d pffiffiffiffiffi i,t i and xi is an estimate of standard deviation mdi . 6. An application of the duration data The duration data set employed is based on a sample of high frequency transactions data obtained for the US IBM stock on five
consecutive trading days from November 1 to November 7, 1990 (see Tsay, 2010, pp. 260–264). Focusing on positive transaction durations, we have 3534 observations. This series is adjusted for time of day affects using a smoothing spline, consisting of two quadratic functions and two indicator variables, one each for the 1st and 2nd five minute periods of each day (see Tsay, 2010, pp. 253–254 for details). Figs. 1–3 show respectively the adjusted series, the histogram of the adjusted series and the autocorrelation plot (ACF) of the adjusted series. Clearly there exist some weak but significant autocorrelations in the adjusted durations, that the ACD model will attempt to capture. The p-value for an associated Ljung–Box statistic is 0. We fit the LINACD (1, 1) and Log-ACD (1, 1) models with Exponential and Weibull distributions using the EF and ML methods for the first 3434 adjusted durations as given below
LINACDð1; 1Þ :
xi ¼ wi ei ;
wi ¼ x þ a1 xi1 þ b1 wi1 ;
and
Log-ACDð1; 1Þ :
^1 obtained by EF method when the true distribution Fig. 9. The histogram for the b follows exponential distribution (b1 = 0.50, n = 2000, N = 2000).
xi ¼ ewi ei ;
wi ¼ x þ a1 ln xi1 þ b1 wi1 :
Based on these fitted models, we calculate in-sample MSPE and in-sample MAPD together with the out-of-sample MSFE and outof-sample MAFD using the last m = 100 adjusted durations to obtain m-step ahead forecasts. The results are shown in Tables 5 and 6. The values of parameter estimates for both models based on two methods are almost the same. Both of these models fit well with this data set. We need to point out that even though EF and ML methods are producing almost the same estimates and MSFE/ MAFD, but in practice, the distribution of the data is unknown. Therefore, ML/QML may not work well in terms of their parameter estimates. The MSPE/MAPDs for LINACD (1, 1) and Log-ACD (1, 1) models based on ML method gives marginal smaller than EF
Table 1 Estimation results using the exponential Log-ACD (1, 1) model (n = 500, N = 2000; x = 0.01, a1 = 0.20, b1 = 0.70 and w1 = 0.50. Data are generated from various distributions as given in column 1.). True distribution exponential
^ x ML
EF
ML
EF
ML
EF
Mean Bias SD RMSE Weibull with c = 1.5
0.0016 0.0116 0.0359 0.0361 QML
0.0007 0.0107 0.0351 0.0346 EF
0.1998 0.0002 0.0274 0.0265 QML
0.1989 0.0011 0.0273 0.0300 EF
0.6908 0.0092 0.0483 0.0480 QML
0.6925 0.0075 0.0485 0.0529 EF
0.0035 0.0092 0.0186 0.0173
0.0040 0.0060 0.0184 0.0173
0.1978 0.0022 0.0275 0.0283
0.1992 0.0008 0.0285 0.0316
0.6908 0.0065 0.0494 0.0498
0.6893 0.0107 0.0496 0.0640
Mean Bias SD RMSE
a^ 1
^1 b
Table 2 Estimation results for the exponential Log-ACD (1, 1) model (n = 2000, N = 2000; x = 0.01, a1 = 0.20, b1 = 0.70 and w1 = 0.50. Data are generated from various distributions as given in column 1.). True distribution exponential
^ x ML
EF
ML
EF
ML
EF
Mean Bias SD RMSE Weibull with c = 1.5
0.0074 0.0026 0.0163 0.0173 QML
0.0068 0.0032 0.0161 0.0173 EF
0.1996 0.0004 0.0136 0.0141 QML
0.1991 0.0009 0.0133 0.0141 EF
0.6985 0.0015 0.0231 0.0224 QML
0.6986 0.0014 0.0235 0.0245 EF
0.0086 0.0014 0.0082 0.0100
0.0086 0.0014 0.0082 0.0100
0.1996 0.0006 0.0138 0.0141
0.1995 0.0005 0.0137 0.0141
0.6980 0.0020 0.0241 0.0245
0.6982 0.0018 0.0236 0.0245
Mean Bias SD RMSE
a^ 1
^1 b
3330
K.H. Ng et al. / Expert Systems with Applications 41 (2014) 3323–3332
Table 3 Estimation results for the exponential Log-ACD (1, 1) model (n = 500, N = 2000; x = 0.10, a1 = 0.20, b1 = 0.50 and w1 = 0.50. Data are generated from various distributions as given in column 1.). True distribution exponential
^ x ML
EF
ML
EF
ML
EF
Mean Bias SD RMSE Weibull with c = 1.5
0.0973 0.0027 0.0476 0.0480 QML
0.1015 0.0015 0.0475 0.0548 EF
0.2021 0.0021 0.0350 0.0346 QML
0.2034 0.0034 0.0345 0.0686 EF
0.5036 0.0036 0.1408 0.1407 QML
0.4867 0.0133 0.1369 0.1949 EF
0.0991 0.0009 0.0364 0.0361
0.1054 0.0054 0.0358 0.0480
0.2019 0.0019 0.0356 0.0361
0.2030 0.0030 0.0352 0.0748
0.5006 0.0006 0.1500 0.1500
0.4730 0.0270 0.1464 0.2071
Mean Bias SD RMSE
a^ 1
^1 b
Table 4 Estimation results for the exponential Log-ACD (1, 1) model (n = 2000, N = 2000; x = 0.10, a1 = 0.20, b1 = 0.50 and w1 = 0.50. Data are generated from various distributions as given in column 1.). True distribution exponential
^ x ML
EF
ML
EF
ML
EF
Mean Bias SD RMSE Weibull with c = 1.5
0.0987 0.0013 0.0223 0.0224 QML
0.0990 0.0010 0.0225 0.0224 EF
0.2006 0.0006 0.0173 0.0173 QML
0.2004 0.0004 0.0171 0.0173 EF
0.5026 0.0026 0.0655 0.0656 QML
0.5016 0.0016 0.0658 0.0671 EF
0.0994 0.0006 0.0166 0.0173
0.0994 0.0006 0.0165 0.0173
0.2006 0.0006 0.0174 0.0173
0.2006 0.0006 0.0174 0.0173
0.5018 0.0018 0.0659 0.0656
0.5017 0.0017 0.0658 0.0671
Mean Bias SD RMSE
a^ 1
^1 b
Table 5 Results for exponential and Weibull LINACD (1, 1) models based on the EF and ML methods. Coefficient
x a1 b1
EF Exponential LINACD (1, 1)
ML Exponential LINACD (1, 1)
0.2646 0.0785 0.8424
0.1379 0.0604 0.8983
16.4382 2.7514 14.6336 2.8338
16.4175 2.7467 14.6442 2.8478
c In-sample MSPE In-sample MAPD Out-of sample MSFE Out-of sample MAFD
EF Weibull LINACD (1, 1)
ML Weibull LINACD (1, 1)
0.2646 0.0785 0.8424 0.8491 16.4382 2.7514 14.6336 2.8338
0.1331 0.0600 0.8997 0.8796 16.4176 2.7426 14.6449 2.8453
Table 6 Results for exponential and Weibull Log-ACD(1, 1) models based on the EF and ML methods. Coefficient
x a1 b1
EF Exponential Log-ACD (1, 1)
ML Exponential Log-ACD (1, 1)
0.1126 0.0617 0.8782
0.1126 0.0618 0.8782
16.3025 2.7306 14.5817 2.8264
16.3025 2.7306 14.5817 2.8264
c In-sample MSPE In-sample MAPD Out-of-sample MSFE Out-of-sample MAFD
method. We also observe that for Log-ACD (1, 1) models produces the smaller MSPE/MAPD than LINACD (1, 1) models. The out-ofsample MSFE for all models based on EF method are smaller than those models based on ML method except Weibull error Log-ACD (1, 1) model. Tables 7 and 8 show the DM test statistics and their corresponding p-values. All results show that Log-ACD (1, 1) and LINACD (1, 1) models have no significance different in the forecast ability using
EF Weibull Log-ACD (1, 1)
ML Weibull Log-ACD (1, 1)
0.1126 0.0617 0.8782 0.8427 16.3025 2.7306 14.5817 2.8264
0.1099 0.0615 0.8802 0.8832 16.3032 2.7267 14.5873 2.8248
the EF and ML estimation methods at 5% significance level. The results of SPA test are shown in Table 9. Each column shows the benchmark model, and the p-value is that which tests whether all other models jointly have lower expected loss where MSE and MAD are considered and mark each row. All p-values of these tests are well above 5% significance level show that no significance different in the forecast ability among all these models using the EF and ML methods.
3331
K.H. Ng et al. / Expert Systems with Applications 41 (2014) 3323–3332
Table 7 The results of the Diebold–Mariano (DM) test for 100-step-ahead forecast, with p-values in parentheses. The benchmark is the exponential LINACD (1, 1) or Weibull LINACD (1, 1) models based on EF method. Loss function based on
Exponential LINACD (1, 1) based on ML method
Weibull LINACD (1, 1) based on ML method
Exponential Log-ACD (1, 1) based on ML method
Weibull Log-ACD (1, 1) based on ML method
Exponential Log-ACD (1, 1) based on EF method
Weibull Log-ACD (1, 1) based on EF method
MSE MAD
0.6969 (0.4859) 0.0843 (0.9328)
0.5639(0.5728) 0.0885(0.9295)
0.1894(0.8498) 0.1859(0.8525)
0.2298(0.8182) 0.1649(0.8690)
0.1894(0.8498) 0.1860(0.8524)
0.1894(0.8498) 0.1860(0.8524)
Table 8 The results of the Diebold–Mariano (DM) test for 100-step-ahead forecast, with p-values in parentheses. The benchmark is the exponential Log-ACD (1, 1) or Weibull Log-ACD (1, 1) models based on EF method. Loss function based on
Exponential LINACD (1, 1) based on ML method
Weibull LINACD (1, 1) based on ML method
Exponential Log-ACD (1, 1) based on ML method
Weibull Log-ACD (1,1) based on ML method
Exponential LINACD (1, 1) based on EF method
Weibull LINACD (1, 1) based on EF method
MSE MAD
0.2839(0.7765) 0.7259(0.4679)
0.2871(0.7740) 0.6442(0.5194)
0.3769(0.7062) 0.1189(0.9054)
0.6164(0.5376) 1.4513(0.1467)
0.1860(0.8524) 0.1894(0.8498)
0.1860(0.8524) 0.1894(0.8498)
Table 9 The results of the superior predictive ability (SPA) test, with p-values in parentheses. Benchmark model loss function based on
Exponential LINACD (1, 1) based on ML method
Weibull LINACD (1, 1) based on ML method
Exponential Log-ACD (1, 1) based on ML method
Weibull Log-ACD (1, 1) based on ML method
Exponential LINACD (1, 1) based on EF method
Weibull Log-ACD (1, 1) based on EF method
MSE MAD
0.2839(0.7765) 2.4089(0.0160)
0.2871(0.7740) 0.6966(0.4861)
0.3769(0.7062) 1.4470(0.1479)
0.6164(0.5376) 0.0000(1.0000)
0.1860(0.8524) 0.2298(0.8182)
0.0000(1.0000) 1.4513(0.1467)
7. Concluding remarks This paper proposes and develops the semi-parametric estimating function (EF) estimator for the class of Log-ACD models. It has few, if any, semi-parametric competitors in the literature. The properties of the proposed EF estimator for Log-ACD and LINACD models are investigated. Based on the simulation study, it is shown that the EF estimators are comparable to those of ML and QML estimators, in terms of bias and efficiency. It is useful to note that the computational time to find the EF estimates is significantly less than that of the ML estimates. Theoretical results of EF estimates are used to develop inferential methods on the parameter estimates of Log-ACD models, with additional empirical evidence for a central limit theorem. Finally, the DM and SPA tests have been applied for the empirical data to compare the forecast accuracy and ability between models estimated by EF and ML methods. Future work can extend EF methods to other new and existing ACD and Log-ACD specifications. Acknowledgments The authors thank the referees and the editor for their useful comments and invaluable suggestions which have improved the quality of this version of the paper. This work has been completed while the first author was visiting the School of Mathematics and Statistics, The University of Sydney in 2013. He acknowledges the support from the school of Mathematics and Statistics during his stay. His work is partially supported by the University of Malaya Research Grant RG174-11AFR. References Allen, D., Chan, F., McAleer, M., & Peiris, M. S. (2008). Finite sample properties of QMLE for the Log-ACD model: Application to Australian stocks. Journal of Econometrics, 147(1), 163–185. Allen, D., Ng, K. H., & Peiris, S. (2013a). Estimating and simulating weibull models of risk or price durations: An application to ACD models. North American Journal of Economics and Finance, 25, 214–225.
Allen, D., Ng, K. H., & Peiris, S. (2013b). The efficient modeling of high frequency transaction data: A new application of estimating functions in financial economics. Economics Letters, 120(1). 177–122. Allen, D., Lazarov, Z., McAleer, M., & Peiris, S. (2009). Comparison of alternative ACD models via density and interval forecasts: Evidence from the Australian stock market. Mathematics and Computers in Simulation, 79(8), 2535–2555. Bauwens, L., Galli, F., & Giot, P. (2008). The moments of Log-ACD models. Quantitative and Qualitative Analysis in Social Sciences, 2(1), 1–28. Bauwens, L., & Giot, P. (2000). The logarithmic ACD model: An application to the bid-ask quote process of three NYSE stocks. Annales D’Economie et de Statistique, 60, 117–145. Bauwens, L., & Giot, P. (2003). Asymmetric ACD models: Introducing price information in ACD models. Empirical Economics, 28(4), 709–731. Bauwens, L., Giot, P., Grammig, J., & Veredas, D. (2004). A comparison of financial duration models via density forecasts. International Journal of Forecasting, 20(4), 589–609. Bauwens, L., & Veredas, D. (2004). The stochastic conditional duration model: A latent variable model for the analysis of financial durations. Journal of Econometrics, 119(2), 381–412. Bera, A. K., & Bilias, Y. (2002). The MM, ME, ML, EL, EF and GMM approaches to estimation: A synthesis. Journal of Econometrics, 107(1–2), 51–86. Bera, A. K., Bilias, Y., & Simlai, P. (2006). Estimating functions and equations: An essay on historical developments with applications to econometrics. In K. Patterson & T. C. Mills (Eds.), Palgrave Handbook of Econometrics (pp. 427–476). Great Britain: Palgrave Macmillan. Bollerslev, T. (1986). Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 31(3), 307–327. David, X. L., & Turtle, H. J. (2000). Semiparametric ARCH models: An estimating function approach. Journal of Business and Economic Statistics, 18(2), 174–186. Diebold, F. X., & Mariano, R. S. (1995). Comparing predictive accuracy. Journal of Business and Economic Statistics, 13(3), 253–263. Drost, F. C., & Werker, B. J. M. (2004). Semiparametric duration models. Journal of Business and Economic Statistics, 22(1), 40–50. Dufour, A., & Engle, R. F. (2000). Time and the price impact of a trade. Journal of Finance, 55(6), 2467–2498. Engle, R. F., & Russell, J. R. (1997). Forecasting the frequency of changes in quoted foreign exchange prices with the autoregressive conditional duration model. Journal of Empirical Finance, 4(2–3), 187–212. Engle, R. F., & Russell, J. R. (1998). Autoregressive conditional duration: A new model for irregularly spaced transaction data. Econometrica, 66(5), 1127–1162. Fernandes, M., & Grammig, J. (2006). A family of autoregressive conditional duration models. Journal of Econometrics, 130(1), 1–23. Godambe, V. P. (1960). An optimum property of regular maximum likelihood estimation. The Annals of Mathematical Statistics, 31(4), 1208–1211. Godambe, V. P. (1985). The foundations of finite sample estimation in stochastic processes. Biometrika, 72(2), 419–428. Godambe, V. P., & Thompson, M. E. (1978). Some aspects of the theory of estimating equations. Journal of Statistical Planning and Inference, 2(1), 95–104.
3332
K.H. Ng et al. / Expert Systems with Applications 41 (2014) 3323–3332
Godambe, V. P., & Thompson, M. E. (1984). Robust estimation through estimating equations. Biometrika, 71(1), 115–125. Hansen, P. R. (2005). A test for superior predictive ability. Journal of Business and Economic Statistics, 23(4), 365–380. Hautsch, N. (2012). Econometrics of financial high-frequency data (1st ed.). New York: Springer. Liu, C., & Maheu, J. M. (2012). Intraday dynamics of volatility and duration: Evidence from Chinese stocks. Pacific-Basin Finance Journal, 20(3), 329–348. Meitz, M., & Terasvirta, T. (2006). Evaluating models of autoregressive conditional duration. Journal of Business and Economic Statistics, 24(1), 104–124. Ng, K. H., & Peiris, M. S. (2013). Modelling high frequency transaction data in financial economics: A comparative study based on simulations. Economic Computation and Economic Cybernetics Studies and Research, 47(2), 189–202. Pacurar, M. (2008). Autoregressive conditional duration models in finance. A survey of the theoretical and empirical literature. Journal of Economic Surveys, 22(4), 711–751.
Pathmanathan, D., Ng, K. H., & Peiris, M. S. (2009). On estimation of autoregressive conditional duration (ACD) models based on different error distributions. Sri Lankan Journal of Applied Statistics, 10, 251–269. Peiris, M. S., Ng, K. H., & Mohamed, I. B. (2007). A review of recent developments of financial time series: ACD modelling using the estimating function approach. Sri Lankan Journal of Applied Statistics, 8, 1–17. Pyrlik, V. (2013). Autoregressive conditional duration as a model for financial market crashes prediction. Physica A: Statistical Mechanics and its Applications, 392(23), 6041–6051. Thavaneswaran, A., & Peiris, M. S. (1996). Nonparametric estimation for some nonlinear models. Statistics and Probability Letters, 28(3), 227–233. Tsay, R. S. (2010). Analysis of financial time series (3rd ed.). New York: John Wiley. Zhang, M. Y., Russell, J. R., & Tsay, R. S. (2001). A non-linear autoregressive conditional duration model with applications to financial transaction data. Journal of Econometrics, 104(1), 179–207.