Quantifying the data-dredging bias in structural break tests
Abstract
EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.
Full text
Hoga, Yannick Article — Published Version Quantifying the data-dredging bias in structural break tests Statistical Papers Provided in Cooperation with: Springer Nature Suggested Citation: Hoga, Yannick (2021) : Quantifying the data-dredging bias in structural break tests, Statistical Papers, ISSN 1613-9798, Springer, Berlin, Heidelberg, Vol. 63, Iss. 1, pp. 143-155, https://doi.org/10.1007/s00362-021-01233-4 This Version is available at: https://hdl.handle.net/10419/286808 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by/4.0/
Statistical Papers (2022) 63:143–155 https://doi.org/10.1007/s00362-021-01233-4 REGULAR ARTICLE Quantifying the data-dredging bias in structural break tests Yannick Hoga1 Received: 3 November 2020 / Revised: 19 March 2021 / Accepted: 30 March 2021 / Published online: 16 April 2021 © The Author(s) 2021 Abstract Structural break tests are often applied as a pre-step to ensure the validity of subsequent statistical analyses. Without any a priori knowledge of the type of breaks to expect, eye-balling the data can indicate changes in some parameter, e.g., the mean. This, however, can distort the result of a structural break test for that parameter, because the data themselves suggested the hypothesis. In this paper, we formalize the eye-balling procedure and theoretically derive the implied size distortion of the structural break test. We also show that eye-balling a stretch of historical data for possible changes in a parameter does not invalidate the subsequent procedure that monitors for structural change in new incoming observations. An empirical application to Bitcoin returns shows that taking into account the data-dredging bias, which is incurred by looking at the data, can lead to different test decisions. Keywords Data-dredging bias ·Hypothesis test ·Monitoring ·Structural breaks JEL Classification C12 (Hypothesis Testing) ·C18 (Methodological Issues) 1 Motivation The importance of plotting the data as a first step of a statistical analysis is stressed in numerous textbooks (e.g., Ruppert and Matteson 2015; Brockwell and Davis 2016). For instance, Brockwell and Davis (2016, p. 12) recommend time series plots to check whether there are ‘any apparent sharp changes in behavior’. If such a change is present in the data, yet is ignored in the subsequent analysis, the conclusions drawn from the data may be invalid (see, e.g., Baltagi et al. 2013; Demetrescu and Hanck 2013;Har- The author is grateful to two referees and Christoph Hanck for their valuable comments and suggestions. This work was supported by the German Research Foundation (DFG) under Grant HO 6305/1-1. BYannick Hoga [email protected] 1Faculty of Economics and Business Administration, University of Duisburg-Essen, Universitätsstraße 12, 45117 Essen, Germany 123
144 Y. Hoga vey et al. 2013;Xu2015). For instance, Xu (2015) shows that if a structural break in the error variances is ignored, standard tests for the the constancy of regression coefficients suffer from size distortions—even asymptotically. To avoid such misleading test results, applying a formal structural break test is typically recommended as a pre-step to the actual statistical analysis of the data. However, one problem with the recommendation to look for ‘any apparent sharp changes in behavior’ is that the decision to apply the structural break test has been informed by the data. Hence, any change point test, if it is to be valid, needs to hold size conditional on having looked at the data. Of course, such tests are exclusively constructed to hold size unconditionally and, hence, suffer from size distortions if applied otherwise. The first main aim of this paper is to quantify these size distortions for structural break tests that are applied conditional on large deviations being observed in the data. We show that these size distortions can become so large that a true null is rejected with certainty. This changes when one moves from a structural break context, where all data are available in advance, to a monitoring context, where—after having observed some training data—the data become available ‘as you go’ for sequential tests of parameter stability. Of course, ex ante it may be unclear precisely which parameters to monitor for constancy. One possibility may be to monitor a parameter, whose estimates have fluctuated somewhat in the training data. Then, similarly as above, the monitoring procedure needs to hold size conditionally on large fluctuations in the training data. The second main aim of this paper is to show that, unlike for one-shot structural break tests, this is indeed the case. We mention that the issue of investigating the data to ‘decide’ which hypotheses to test is an old one. Selvin and Stuart (1966) call this ‘hunting’, because the investigator hunts for hypotheses to be tested based on the data. They illustrate the practice with Pearson’s χ2goodness-of-fit (GoF) test. In applications, a possible distribution for the data is usually not chosen ex ante,butex post by eye-balling a histogram. This practice is to some extent unavoidable, as in our structural break example. Selvin and Stuart (1966) conclude with regard to hunting that ‘the only criticism to be made is of the delusion that one has to pay no price for the sport.’ Interestingly, while in general the bias incurred by hunting—as in the GoF example—is hard to quantify, it is possible for monitoring procedures and (up to a single unknown parameter) also for structural break tests. Even outside the statistical literature, testing hypothesis on the same data that inspired it is known to be harmful. In the social sciences, Kerr (1998) calls this HARK- ing (Hypothesizing After the Results are Known) and defines it as presenting a post hoc hypothesis (i.e., one informed by the collected data) as an a priori hypothesis. Among others, Simmons et al. (2011) and Gelman and Loken (2014) point out that data analyses in the social sciences are often driven by the observed data, and show that this contributes—among other factors—to the prevalence of false negatives in published work (which is a finding that has led to the so-called replication crisis). This is as in our one-shot structural break setting, where the data-inspired hypothesis (‘there is a structural break in the data’) is more likely to be accepted even when wrong, producing a false negative. 123
Quantifying the data-dredging bias 145 The remainder of the paper proceeds as follows. Section 2states and discusses the main theoretical results of this paper. The proofs of these results are deferred to the Appendix. An empirical application to Bitcoin returns in Sect. 3demonstrates that if the decision to apply a structural break test is made conditional on the data, different results may be obtained when this fact is taken into account. The final Sect. 4 concludes. 2 Main results 2.1 Structural break tests Let X1,...,Xndenote the (possibly multivariate) observations to be tested for a structural break in some scalar parameter γiof their respective distribution function Fi (i=1,...,n). For instance, γimay be the mean or the variance of a component series, or it may denote the correlation or tail dependence coefficient of two components of the series. Structural break tests for these parameters are well-established (see, e.g., Inclan and Tiao 1994; Vogelsang 1998; Wied et al. 2012;Hoga2018). Interest in change point tests focuses on the null hypothesis HS 0:γ=γ1=···=γn, i.e., the constancy of the parameter γover time. Let γ(0,t)denote an estimate of γbased on the subsample X1,...,Xnt. Here, · rounds down to the nearest integer. Further, let D[0,1]denote the space of real-valued functions on [0,1]that possess left-hand limits and are right-continuous (Davidson 1994). We make the following high-level assumption under HS 0: Assumption 1 It holds that, as n→∞, tknγ(0,t)−γd −→ σW(t)inD[0,1], where σ>0, kn→∞, and {W(t)}t∈[0,1]denotes a standard Brownian motion. Such a functional central limit theorem has been shown to hold for many parameters. For the leading case kn=n, it holds (e.g.) for the mean (Davidson 1994), the variance (Wied et al. 2012), correlation (Wied et al. 2012) and Kendall’s tau (Dehling et al. 2017). For extreme value quantities, whose estimators typically depend only on a vanishing fraction of the sample, a scaling different from √nis required in Assumption 1. For instance, Assumption 1holds for the tail index (Hoga 2017a), an extreme quantile estimator (Hoga 2017b) and the tail dependence coefficient (Hoga 2018)for some kn=o(n). For feasible break testing, the nuisance parameter σin Assumption 1 needs to be estimated consistently. To that end, we impose the following assumption under HS 0: Assumption 2 There exists an estimator σsatisfying σp −→ σ,asn→∞. 123
146 Y. Hoga The usual recursive test statistic for testing HS 0is Tn=1 σsup t∈[0,1]tknγ(0,t)−γ(0,1)d −→ sup t∈[0,1]|W(t)−tW(1)|,n→∞,(1) where the convergence follows from Assumptions 1and 2and the continuous mapping theorem together with Slutsky’s theorem (Davidson 1994). Here, fluctuations in the recursive parameter estimates γ(0,t)that deviate ‘too much’ from the full-sample estimate γ(0,1)are taken as evidence against the null. Based on the (1−α)-quantile cS αof the limiting distribution in (1), we reject HS 0at significance level α∈(0,1)if Tn>cS α, since from (1) Pr Tn>cS α−→ α, n→∞.(2) However, often the decision to apply a structural break test (usually to validate the intended subsequent statistical analysis) is not made before the data have been collected. Rather, as pointed out in the Motivation, it is made afterwards based on having observed some large deviations in the series. This eye-balling may be formalized as testing if and only if t|γ(0,t)−γ(0,1)|/σ>δ/ √knfor some t∈[0,1], where the ‘if and only if’-part of course constitutes a crude approximation. Here, the prefactor tdiscounts a large deviation that is based on very few data points for small t;the inclusion of √knreflects smaller expected fluctuations in larger samples;σ2estimates the asymptotic variance of γ(0,1)and, hence, reflects estimation uncertainty; finally, δ>0 determines the (unknown) sensitivity of the visual inspection. In other words, δis the parameter for which eye-balling for changes can be best approximated by the conditioning event {supt∈[0,1]t|γ(0,t)−γ(0,1)|/σ>δ/ √kn}. Of course, this approximation of the eye-balling heuristic may not be perfect, but we argue that it is close enough to be interesting. For instance, plots of t→ γ(0,t) are often used as a diagnostic tool indicating structural change; see, e.g., Quintos et al. (2001, Fig. 3) or Wied et al. (2012, Fig. 1). For obvious reasons, we call the above procedure ‘formalized’ eye-balling. Now, carrying out the structural break test if only if t|γ(0,t)−γ(0,1)|/σ>δ/ √kn for some t∈[0,1], the probability that should be controlled is Pr Tn>cS α 1 σsup t∈[0,1]{t|γ(0,t)−γ(0,1)|}>δ/ kn,(3) and not Pr Tn>cS αas in (2). Of course, the conditioning event in the above probability may also be written as {Tn>δ}. We prefer to write it as in (3) to emphasize the ‘formalized’ eye-balling rationale of the conditioning. Remark 1 To appreciate the difference between the conditional and unconditional approach, consider trajectories X(b) 1,...,X(b) n(b=1,...,B)forwhich(2) holds under HS 0. Then, for sufficiently large n, one expects to reject HS 0in the unconditional procedure for Bαof these trajectories. In contrast, the conditional approach considers 123
Quantifying the data-dredging bias 147 only those, say k, trajectories {X(bi) 1,...,X(bi) n}i=1,...,kwith visually apparent indications of change, i.e., those trajectories satisfying supt∈[0,1]{t|γ(0,t)−γ(0,1)|}/σ> δ/√kn. If one rejects HS 0for each of these ktrajectories where the test statistic exceeds cS α, one cannot expect a rejection in (the desired number of) kαcases, but instead the number of rejections is much higher, since only trajectories with large fluctuations are considered in the first place. Formally, the asymptotic rejection probability is given by the following Theorem 1 Suppose Assumptions 1and 2hold. Then, under HS 0,asn→∞, Pr Tn>cS α 1 σsup t∈[0,1]{t|γ(0,t)−γ(0,1)|}>δ/ kn−→ 1,δ>cS α, α f(δ) ,δ≤cS α, (4) where f (x)=2∞ n=1(−1)n−1exp{−2n2x2}=Pr supt∈[0,1]|W(t)−tW(1)|≥x ∈[0,1]. As a simple application of the elementary conditional probability formula, the proof of Theorem 1is almost trivial. The main insight afforded by Theorem 1is that the textbook recommendation to look for ‘any apparent changes in behavior’ (Brockwell and Davis 2016, p. 12) should come with a warning that, if the formal structural break test is applied as usual (i.e., with the same critical value cS αsuggested by the unconditional test), it rejects the null more often than it should. Moreover, the influence of the conditioning can be quantified up to the parameter δ. This is in contrast to the example of GoF tests mentioned in the Motivation. There, the act of looking at a histogram and spotting a resemblance with some parametric distribution is much harder to formalize and, hence, the impact on a subsequent GoF test much harder to quantify. Specifically, Theorem 1formalizes the intuition that if there is preliminary (‘formalized’ eye-balling) evidence in the data that a null hypothesis is false, then that null is more likely to be rejected, because the other cases—where there is no preliminary evidence—are not considered. Since the conditioning event in (4) may be equivalently written as {Tn>δ}, it is clear that, in case δ>cS α, the true null is rejected not only asymptotically with probability one, but even almost surely in finite samples. Even for a less stringent testing condition with δ≤cS αthe conditional (asymptotic) rejection probability under the null, α/ f(δ), is larger than α. Only when δ=0, i.e., when there is no conditioning, is the desired type I error rate of αattained. Nonetheless, if δis known (which is typically not the case), there is a way to keep a desired confidence level αeven in the conditional test. For a fixed δ>0, one simply chooses α∗=αf(δ) ∈(0,α). Then, by (4), Pr Tn>cS α∗ 1 σsup t∈[0,1]{t|γ(0,t)−γ(0,1)|}>δ/ kn−→ α∗/f(δ) =α, n→∞. This means that when the test is only applied if the data provide preliminary evidence for a structural break, the resulting bias can be corrected by suitably lowering the 123
148 Y. Hoga confidence level of the critical value. In spirit, this is similar to the usual pre-testing strategy of (suitably) lowering the significance level that avoids inflating type I error (Giles and Giles 1993). Remark 2 Theorem 1only investigates the behavior of the test under the null and shows it to be oversized. In line with the well-known tradeoff between type I- and type II-error, this suggests that the test has higher power under the alternative. We refrain from formally investigating the (local) power of the test, as it is does not hold size and, hence, is not a valid statistical test. 2.2 Monitoring parameter changes Let X1,...,Xndenote the variables in the training period that are available prior to monitoring. The goal in monitoring is to detect breaks in some parameter as new observations Xn+1,Xn+2,...become available, and to do so as quickly as possible. Formally, interest in monitoring centers on sequentially testing HM 0:γ=γn+1=γn+2=··· given the non-contamination assumption γ=γ1=···=γn, which imposes structural stability in the training period. Of course, non-contamination can be tested using the methods of Sect. 2.1. We consider so-called closed-end procedures, where monitoring stops after Xn+1,...,XnT(1 <T<∞) have been observed. Let γ(a,b)denote a γ-estimate based on Xna+1,...,Xnb(0 ≤a<b≤T). Define D2[0,T]as the space of all R2-valued functions on [0,T]that are rightcontinuous with left-hand limits in each component (Davidson 1994). The following condition is the analogue of Assumption 1and has likewise been shown to hold for various estimators (see, e.g., Hoga and Wied (2017)). Assumption 3 It holds that, as n→∞, knt[γ(0,t)−γ] t0[γ(t,t+t0)−γ]d −→ σW(t) W(t+t0)−W(t)in D2[0,T−t0], where σ>0, t0>0, T>max{t0,1}, and {W(t)}t∈[0,T]denotes a standard Brownian motion. We base monitoring on the moving-sum detector Mn(t)=1 σt0kn[γ(t,t+t0)−γ(0,1)],t∈[1,T−t0], where the estimator σfrom Assumption 2is typically calculated from the noncontaminated training data. The idea behind Mn(t)is that large deviations between γ(t,t+t0)and the non-contaminated estimate γ(0,1)indicate a structural change in the monitoring period. Again by the continuous mapping theorem and Slutzky’s 123
Quantifying the data-dredging bias 149 lemma, it follows under Assumptions 2and 3that sup t∈[1,T−t0] Mn(t)d −→ sup t∈[1,T−t0]|W(t+t0)−W(t)−t0W(1)|. Thus, we reject HM 0at significance level α∈(0,1)as soon as Mn(t)>cM αfor some t>1, where cM αis implicitly defined by Pr sup t∈[1,T−t0]|W(t+t0)−W(t)−t0W(1)|>cM α=α. Hence, one controls the asymptotic probability Pr sup t∈[1,T−t0] Mn(t)>cM α−→ α, n→∞.(5) When deciding which parameters to monitor, one may choose those whose subsample estimates have exhibited some variation in the training period. This again leads us to consider monitoring for change conditional on supt∈[0,1]{t|γ(0,t)−γ(0,1)|}/σ> δ/√knfor some δ>0. As before, the parameter δis unknown, depending on the sensitivity of the visual inspection by the practitioner. When monitoring conditionally on having observed some noticeable variation in the training period, one should control Pr sup t∈[1,T−t0] Mn(t)>cM α 1 σsup t∈[0,1]{t|γ(0,t)−γ(0,1)|}>δ/ kn.(6) If δcould actively be chosen in practice, it should not be chosen too large (larger than some critical value cS α), because this would already be evidence against γ1=···=γn (cf. (2)), violating the non-contamination assumption. However, the conditioning in (6) does not matter asymptotically for monitoring, as shown next. Theorem 2 Suppose Assumptions 2and 3hold. Then, under HM 0,asn→∞, Pr sup t∈[1,T−t0] Mn(t)>cM α 1 σsup t∈[0,1]{t|γ(0,t)−γ(0,1)|}>δ/ kn−→ α. (7) Theorem 2shows that when the training data inspire a test of HM 0, the monitoring procedure can be applied as usual, i.e., with the same boundary cM αas in (5). This result is reminiscent of the intuition that, while one cannot (without modification at least) use the same data that inspired a hypothesis to test it, one can simply wait for fresh (out-of-sample) data to verify it. The limit in (7) would trivially obtain if the two events in the probability were independent. Yet, this is not the case, as γ(0,1)is common to both events, and the underlying Xt’s may be serially dependent across the training and monitoring period. 123
150 Y. Hoga Remark 3 The conclusion of Theorem 2does not depend on the type of detector used. For instance, using the expanding sum detector En(t)=1 σ|(t−1)√kn[γ(1,t)− γ(0,1)]|would—under a suitable analogue of Assumption 3—lead to the same result. We omit details for brevity. Remark 4 Reconsider the set-up of Remark 1. Suppose Assumptions 2and 3hold for the (continued) simulated trajectories X(b) 1,...,X(b) n,X(b) n+1,...(b=1,...,B). Then, in sufficiently large samples, one expects to reject HM 0based on unconditional testing for roughly α% of all trajectories; see (5). (This is as in the structural break setting of Sect. 2.1, where one also rejects HS 0for α% of all trajectories.) If monitoring is done conditionally, then one expects to reject HM 0for α%ofthektrajectories satisfying the conditioning event. (This contrasts with the structural break tests, where—in the conditional setting—HS 0is rejected for α/ f(min{δ, α})%ofsaidktrajectories.) Hence, while (5) and (7) suggest an equal number of type I errors asymptotically, the trajectories tested are different—in unconditional monitoring all trajectories are considered, whereas conditional monitoring only considers the fraction, where the condition is met. Remark 5 The result illustrated in Remark 4for the different conditional rejection probabilities in structural break testing and monitoring has some analogy with the following example. Suppose a coin comes up heads 9 out of 10 times. This then raises some suspicion of the fairness of the coin. The data-inspired hypothesis that the coin is unfair, is then more likely to be accepted as true when tested on the same observations. (This result is analogous to Theorem 1.) However, tossing the same coin again 10 times, the ‘unfair coin’ hypothesis—suggested by the first 10 throws—can be tested on fresh data as if no conditioning took place. (This is analogous to Theorem 2, where out-of-sample data become available for monitoring.) Of course, while fresh dataisalsousedintestingHM 0, the monitoring situation is more complex than the coin flip example. First, data may be serially dependent in Theorem 2. Second, γ(0,1) appears in both the detector Mn(t)and the conditioning event in (6). 3 Empirical application Here, we illustrate the practical implications of Theorems 1and 2.Wedosousing Bitcoin log-returns X1,...,Xnfrom 01/01/2016 to 31/12/2019, giving n=1,461 observations.1Böhme et al. (2015) provide a comprehensive review of the cryptocurrency. Due to the rising popularity of crypto-currencies, much research effort has been devoted to studying Bitcoin, which represents the largest market share among all crypto-currencies. For instance, Urquhart (2016) investigates the efficiency of the Bitcoin market using, among others, a classical Ljung–Box test. Most tests (including Ljung–Box tests) rely on the absence of structural breaks for their validity. However, as Bitcoins represent a new asset class, ex ante knowledge of the parameters that may change (e.g., mean, variance, higher order moments, tail index, autocorrelations, etc.) is hard to justify. Testing for change in all conceivable parameters invariably inflates 1The data were downloaded from finance.yahoo.com (Ticker Symbol: BTC-USD). 123