Package JumpTest usage tips

Kaiqiao Li, and Pei Fen Kuan
Department of Applied Mathematics and Statistics, Stony Brook University

Stony Brook, NY 11790



This vignette provides an introduction to nonparametric tests to financial jump detection. R package JumpTest provided both simulation methods and test methods with multiple tests correction. The package can be loaded with command:

## Loading required package: MASS

Workflow: Meta Analysis

This package provided analysis on high frequency stock markets. You can simply simulate the data using the simulation codes we provided. For example you can simulate a stoachasitc volatility with one factor and jump (SV1FJ) model (Dumitru and Urga 2012) for 1200 days using the following code.

M <- 390*60
m <- 1200
pric <- SV1FJ(M,m,3,.2,.03,.5,0,.125,-.1,-.62)
lp <- c(3,pric[,1])
lr <- diff(lp[seq(1,M*m+1,60)])
logreturn <- matrix(lr,ncol=m)

Here we simulated our data by seconds, while we grabbed the minute level data and saved the log returns per day by columns. Then we can used the following code to obtain the p-values for three methods (BNS (Barndorff-Nielsen, Shephard, and Winkel 2006), Amed, and Amin (Andersen, Dobrev, and Schaumburg 2012)).

pmat <- pcombine(logreturn,c('BNS','Amed','Amin'))

Then we can obtain the p-value matrix for the three methods. We can do further p-values pooling and FDR control via BH (Benjamini and Hochberg 1995, Yen (2013)) procedure. We provided six pooling methods, four for independent (Won et al. 2009, Chang et al. (2013)) and two for dependent (Chang et al. 2013) strucure. We suggested Stouffer’s dependent (SD) structure.

res <- ppool(pmat)
pvalue <- res@pvalue
pvalue_adjusted <- res@adjp

Conclusion and Ongoing Work

R package JumpTest provides effective tools to detect jump in high frequency stock market data. It can efficiently identify intervals that contain jumps. In the future we may develop methods that can locate the exact location of jumps.


Andersen, Torben G, Dobrislav Dobrev, and Ernst Schaumburg. 2012. “Jump-Robust Volatility Estimation Using Nearest Neighbor Truncation.” Journal of Econometrics 169 (1). Elsevier: 75–93.

Barndorff-Nielsen, Ole E, Neil Shephard, and Matthias Winkel. 2006. “Limit Theorems for Multipower Variation in the Presence of Jumps.” Stochastic Processes and Their Applications 116 (5). Elsevier: 796–806.

Benjamini, Yoav, and Yosef Hochberg. 1995. “Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing.” Journal of the Royal Statistical Society. Series B (Methodological). JSTOR, 289–300.

Chang, Lun-Ching, Hui-Min Lin, Etienne Sibille, and George C Tseng. 2013. “Meta-Analysis Methods for Combining Multiple Expression Profiles: Comparisons, Statistical Characterization and an Application Guideline.” BMC Bioinformatics 14 (1). BioMed Central: 368.

Dumitru, Ana-Maria, and Giovanni Urga. 2012. “Identifying Jumps in Financial Assets: A Comparison Between Nonparametric Jump Tests.” Journal of Business & Economic Statistics 30 (2). Taylor & Francis: 242–55.

Won, Sungho, Nathan Morris, Qing Lu, and Robert C Elston. 2009. “Choosing an Optimal Method to Combine P-Values.” Statistics in Medicine 28 (11). Wiley Online Library: 1537–53.

Yen, Yu-Min. 2013. “Testing Jumps via False Discovery Rate Control.” PloS One 8 (4). Public Library of Science: e58365.