## 1. INTRODUCTION

The class of realized kernel estimators, introduced by Barndorff-Nielsen et al. (2008a), can be used to estimate the quadratic variation of an underlying efficient price process from high-frequency noisy data. This method, together with alternative techniques such as subsampling and pre-averaging, extends the influential realized variance literature which has recently been shown to significantly improve our understanding of time-varying volatility and our ability to predict future volatility—see Andersen et al. (2001), Barndorff-Nielsen and Shephard (2002) and the reviews of that literature by, for example, Andersen et al. (2008) and Barndorff-Nielsen and Shephard (2007).^{1} In this paper, we detail the implementation of our recommended realized kernel estimator in practice, focusing on end effects, bandwidth selection and data cleaning across different types of financial databases.

We place emphasis on methods that deliver similar estimates of volatility when applied to either quote data or trade data. This is difficult as they have very different microstructure properties. We show realized kernels perform well on this test. We identify a feature of some data sets, which causes these methods difficulties—gradual jumps. These are rare in financial markets; they are when prices exhibit strong linear trends for periods of quite a few minutes. We discuss this issue at some length.

In order to focus on the core issue, we represent the period over which we wish to measure the variation of asset prices as the single interval [0, *T*]. We consider the case where *Y* is a Brownian semimartingale plus jump process given from

where is a finite activity jump process (meaning it has a finite number of jumps in any bounded interval of time). So, *N*_{t} counts the number of jumps that have occurred in the interval [0, *t*] and *N*_{t} < ∞ for any *t*. We assume that *a* is a predictable locally bounded drift, σ is a càdlàg volatility process and *W* is a Brownian motion, all adapted to some filtration . For reviews of the econometrics of processes of the type *Y* see, for example, Shephard (2005).

Our object of interest is the quadratic variation of *Y*,

where is the integrated variance. We estimate it from the observations

where is a noisy observation of

We initially think of *U* as noise and assume . It can be due to, for example, liquidity effects, bid/ask bounce and misrecording. Specific models for *U* have been suggested in this context by, for example, Zhou (1996), Hansen and Lunde (2006), Li and Mykland (2007), and Diebold and Strasser (2007). We will write to denote the case where are mutually independent and jointly independent of *Y*.

There has been substantial recent interest in learning about the integrated variance and the quadratic variation in the presence of noise. Leading references include Zhou (1996), Andersen et al. (2000), Bandi and Russell (2008), Hansen and Lunde (2006), Zhang et al. (2005), Zhang (2006), Kalnina and Linton (2008), Jacod et al. (2007), Fan and Wang (2007), and Barndorff-Nielsen et al. (2008a).

Our recommended way of carrying out estimation based on realized kernels is spelt out in Barndorff-Nielsen et al. (2008b). Their non-negative estimator takes on the following form:

where *k*(*x*) is a kernel weight function. We focus on the Parzen kernel, because it satisfies the smoothness conditions, *k*′(0) = *k*′(1) = 0, and is guaranteed to produce a non-negative estimate.^{2} The Parzen kernel function is given by

Here *x*_{j} is the *j*th high frequency return calculated over the interval τ_{j−1}–τ_{j} in a way that is detailed in Section 2.2. The method by which these returns are calculated is not trivial, for the accuracy and depth of data cleaning is important, as are the influence of end conditions.

This realized kernel has broadly the same form as a standard heteroskedasticity and autocorrelated (HAC) covariance matrix estimator familiar in econometrics (e.g. Andrews, 1991), but unlike them, the statistics are not normalized by the sample size. This makes their analysis more subtle and the influence of end effects theoretically important.

Barndorff-Nielsen et al. (2008b) show that as if and then

The dependence between *U* and *Y* is asymptotically irrelevant. They need *H* to increase with *n* in order to eliminate the noise in such a way that . With *H* ∝ *n*^{η}, we will need η > 1/3 to eliminate the variance and η > 1/2 to eliminate the bias of *K*(*U*), when .^{3} For , we simply need η < 1.Barndorff-Nielsen et al. (2008b) show that *H* ∝ *n*^{3/5} is the best trade-off between asymptotic bias and variance.^{4}

Their preferred choice of bandwidth is

where *c**= ((12)^{2}/0.269)^{1/5}= 3.5134 for the Parzen kernel. The bandwidth *H** depends on the unknown quantities ω^{2} and , where the latter is called the integrated quarticity. In the next section, we define an estimator of ξ, which leads to a bandwidth, that can be implemented in practice.

Although the assumption that is a strong one, it is not needed for consistency. Previously has been shown under quite wide conditions, allowing, for example, the *U* to be a weakly dependent covariance stationary process. The realized kernel estimator in (1.2) is robust to serial dependence in *U* and can therefore be applied to the entire database of high-frequency prices. In comparison, Barndorff-Nielsen et al. (2008a) applied the flat-top realized kernel to prices sampled approximately once per minute, in order not to be in obvious violation of —an assumption that the flat-top realized kernel estimator is based upon.

The structure of the paper is as follows. In Section 2, we discuss the selection of the bandwidth *H* and the important role of end effects for these statistics. This is followed by Section 3, which is on the data we used in our analysis and the data cleaning we employed. We then look at our data analysis in Section 4, suggesting there are some days where our methods are really challenged, while on most days, we have a pretty successful analysis. Overall, we produce the empirically important result that realized kernels applied to quote and trade data produce very similar results. Hence for applied workers, they can use these methods on either type of data source with some comfort. This analysis is followed by a conclusion in Section 5.