This test examines the presence of jumps in highfrequency price series. It is based on theory of Barndorff- Nielsen and Shephard (BNS). The null hypothesis is no jumps. Depending on users' choices of estimator (integrated variance (IVestimator), integrated quarticity (IQestimator)), mechanism (linear, ratio) and adjustment (logarith), the function returns the result. Function returns three outcomes: 1.z-test value 2.critical value(with confidence level of 95%) and 3.pvalue of the test.

Assume there is *N* equispaced returns in period *t*.

Assume the Realized variance (RV), IVestimator and IQestimator are based on *N* equispaced returns.

Let *r_{t,i}* be a return (with *i=1, …,N*) in period *t*.

Then the BNSjumptest is given by:

*
\mbox{BNSjumptest}= \frac{RV - IVestimator}{√{(θ-2)\frac{1}{N} {IQestimator}}}
*

in which, *IVestimator* can be: bipower variance (BV), minRV, medRV.
*IQestimator* can be: tripower quarticity (TPQ), quadpower quarticity (QPQ), minRQ, medRQ.

*θ*: depends on IVestimator.
(Huang and Tauchen (2005))

1 2 | ```
BNSjumptest(rdata, IVestimator= "BV", IQestimator= "TPQ", type= "linear", logtransform= FALSE,
max= FALSE, align.by= NULL, align.period= NULL, makeReturns = FALSE, ...)
``` |

`rdata` |
a zoo/xts object containing all returns in period t for one asset. |

`IVestimator` |
can be chosen among jump robust integrated variance estimators: BV, minRV, medRV and corrected threshold bipower variation (CTBV). If CTBV is chosen, an argument of |

`IQestimator` |
can be chosen among jump robust integrated quarticity estimators: TPQ, QPQ, minRQ and medRQ. TPQ by default. |

`type` |
a method of BNS testing: can be linear or ratio. Linear by default. |

`logtransform` |
boolean, should be TRUE when QVestimator and IVestimator are in logarith form. FALSE by default. |

`max` |
boolean, should be TRUE when max adjustment in SE. FALSE by default. |

`align.by` |
a string, align the tick data to "seconds"|"minutes"|"hours" |

`align.period` |
an integer, align the tick data to this many [seconds|minutes|hours]. |

`makeReturns` |
boolean, should be TRUE when rdata contains prices instead of returns. FALSE by default. |

`...` |
additional arguments. |

The theoretical framework underlying jump test is that the logarithmic price process *X_t* belongs to the class of Brownian semimartingales, which can be written as:

*
\mbox{X}_{t}= \int_{0}^{t} a_udu + \int_{0}^{t}σ_{u}dW_{u} + Z_t
*

where *a* is the drift term, *σ* denotes the spot volatility process, *W* is a standard Brownian motion and *Z* is a jump process defined by:

*
\mbox{Z}_{t}= ∑_{j=1}^{N_t}k_j
*

where *k_j* are nonzero random variables. The counting process can be either finite or infinite for finite or infinite activity jumps.

Since the realized volatility converges to the sum of integrated variance and jump variation, while the robust IVestimator converges to the integrated variance, it follows that the difference between *RV_{t,N}* and the IVestimator captures the jump part only, and this observation underlines the BNS test for jumps. (Theodosiou& Zikes(2009))

list

Giang Nguyen, Jonathan Cornelissen and Kris Boudt

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.

Corsi, F., Pirino, D., & Reno, R. (2010). Threshold bipower variation and the impact of jumps on volatility forecasting. Journal of Econometrics, 159(2), 276-288.

Huang, X., & Tauchen, G. (2005). The relative contribution of jumps to total price variance. Journal of financial econometrics, 3(4), 456-499.

Theodosiou, M., & Zikes, F. (2009). A comprehensive comparison of alternative tests for jumps in asset prices. Unpublished manuscript, Graduate School of Business, Imperial College London.

1 2 3 | ```
data(sample_tdata)
BNSjumptest(sample_tdata$PRICE, QVestimator= "RV", IVestimator= "minRV",
IQestimator = "medRQ", type= "linear", makeReturns = TRUE)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.