Hayashi-Yoshida Covariance Estimation and High-Frequency Data Pitfalls
Summary
The document concerns use of the Hayashi-Yoshida estimator for measuring dependence between asynchronously observed prices, illustrated by the same liquid asset trading on two exchanges. The questioner reports unexpectedly low estimated correlation and a one-second feature in a lead-lag analysis, and asks for Python code or troubleshooting guidance. The response points to R packages that implement Hayashi-Yoshida covariance and broader temporal or spatiotemporal statistical methods.
The answer also warns about boundary artifacts in the estimator and recommends considering a more robust cross-correlation approach using the Bjornstad-Falck kernel. It does not provide Python code, diagnose the reported result, or explain the estimator's assumptions and implementation. Consequently, the document offers a pointer to software and a caution about estimator behavior rather than a reproducible method. Its main practical lesson is to scrutinize high-frequency synchronization and boundary effects before interpreting weak correlations or apparent short-lag relationships.
Key ideas
- The Hayashi-Yoshida estimator is used for covariance estimation with asynchronously observed data.
- The question reports low correlation and a short-lag feature for the same asset traded on separate exchanges.
- The response points to R implementations rather than supplying Python code.
- Boundary artifacts are cited as a reason to consider a robust kernel-based cross-correlation method.
Tags
Full text
# Code for HY Estimator # Code for HY Estimator Does anyone here has a code for HY estimator, preferably in python? I have written a very basic code in python but my results are weird. When I run it for two liquid assets traded on two different exchanges simultaneously, I get a correlation of only 0.8% and a lead/analysis shows a kink at 1-sec. It is the same asset trading in two places so the correlation has to be fairly significant and 1-sec of lead/lag is very very unlikely. I was wondering if someone can help or share a few pointers? I know of the yuima library in R which implements this, but my knowledge of R minimal and hence looking for some help. ## Answer by hroptatyr (score 2) https://quant.stackexchange.com/a/35330 Unfortunately for you (but maybe helpful to others) I can only refer to R packages. The R package high-frequency (link) provides `rHYCov`. The synchrony package (link) provides a whole plethora of methods for temporal, spatial and spatio-temporal statistics. Furthermore, I would personally advise against HY for its boundary artefacts and instead use something more robust like cross-correlation with the Bjornstad-Falck kernel.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.