Question on highfrequency package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Question on highfrequency package

Sal Abbasi
Hi,

I’m trying to use the highfrequency package and I have a question on Jump detection using the ABDJumpTest function in realized.R which is called from function harModel

Looking at the current code for this function, I see:

ABDJumptest = function(RV, BPV, TQ){ # Comput jump detection stat mentioned in roughing paper
    mu1  = sqrt(2/pi);
    n = length(RV);
    zstat = ((1/n)^(-1/2))*((RV-BPV)/RV)*(  (mu1^(-4) + 2*(mu1^(-2))-5) * pmax( 1,TQ*(BPV^(-2)) )   )^(-1/2);
    return(zstat);
}

I believe this is trying to implement Equation 18 in this paper: http://www.nber.org/papers/w11775.pdf <http://www.nber.org/papers/w11775.pdf>

If I read the paper correctly, n should be the number of observations per day.  For example if we are passing in 5 minute returns, n should be the number of 5 minute intervals during a trading day.

In the current code, n is being used as the number of days in the set of returns.

Does anybody have any thoughts on this?   I’m new to R-Sig and I’m more of a Python than a R programmer, so if this is the wrong forum, would appreciate someone pointing me to the right forum.

Best,

Sal




        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.