Realised variance converges to integrated variance PLUS jump variation; bipower variation converges to integrated variance alone. Their difference is therefore a jump detector, and the linear statistic z = (RV - BPV) / sqrt((theta - 2) TP / N), with theta = pi^2/4 + pi - 3, is asymptotically standard normal under "no jumps". TP is realised tripower quarticity, itself jump-robust: plain realised quarticity would let the jump being tested for inflate the standard error and destroy the power. One-sided – only a positive z is evidence of jumps.
References
Barndorff-Nielsen, O. E. & Shephard, N. (2006). Econometrics
of testing for jumps in financial economics using bipower variation.
Journal of Financial Econometrics 4(1), 1-30. Cross-checked
against BNSjumpTest in the highfrequency package.
Examples
morie_bns_jump_test(c(0.01, -0.02, 0.015, -0.005, 0.02))$statistic
#> [1] 0.2420799
