BNSjumpTest: Barndorff-Nielsen and Shephard (2006) tests for the presence...

BNSjumpTestR Documentation

Barndorff-Nielsen and Shephard (2006) tests for the presence of jumps in the price series.

Description

This test examines the presence of jumps in highfrequency price series. It is based on theory of Barndorff-Nielsen and Shephard (2006). The null hypothesis is that there are no jumps.

Usage

BNSjumpTest(
  rData,
  IVestimator = "BV",
  IQestimator = "TP",
  type = "linear",
  logTransform = FALSE,
  max = FALSE,
  alignBy = NULL,
  alignPeriod = NULL,
  makeReturns = FALSE,
  alpha = 0.975
)

Arguments

rData

either an xts or a data.table containing the log-returns or prices of a single asset, possibly over multiple days-

IVestimator

can be chosen among jump robust integrated variance estimators: rBPCov, rMinRVar, rMedRVar, rOWCov and corrected threshold bipower variation (rThresholdCov). If rThresholdCov is chosen, an argument of startV, start point of auxiliary estimators in threshold estimation can be included. rBPCov by default.

IQestimator

can be chosen among jump robust integrated quarticity estimators: rTPQuar, rQPVar, rMinRQuar and rMedRQuar. rTPQuar 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 logarithm form. FALSE by default.

max

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

alignBy

character, indicating the time scale in which alignPeriod is expressed. Possible values are: "ticks", "secs", "seconds", "mins", "minutes", "hours" To aggregate based on a 5 minute frequency, set alignPeriod = 5 and alignBy = "minutes".

alignPeriod

positive numeric, indicating the number of periods to aggregate over. For example, to aggregate based on a 5 minute frequency, set alignPeriod = 5 and alignBy = "minutes".

makeReturns

boolean, should be TRUE when pData contains prices. FALSE by default.

alpha

numeric of length one with the significance level to use for the jump test(s). Defaults to 0.975.

Details

Assume there is N equispaced returns in period t. Assume the Realized variance (RV), IVestimator and IQestimator are based on N equi-spaced returns.

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

Then the BNSjumpTest is given by

\mbox{BNSjumpTest}= \frac{\code{RV} - \code{IVestimator}}{√{(θ-2)\frac{1}{N} {\code{IQestimator}}}}.

The options for IVestimator and IQestimator are listed above. θ depends on the chosen IVestimator (Huang and Tauchen, 2005).

The theoretical framework underlying the 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_u \ du + \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 and the IVestimator captures the jump part only, and this observation underlines the BNS test for jumps (Theodosiou and Zikes, 2009).

Value

a list or xts (depending on whether input prices span more than one day) with the following values:

  • z-test value.

  • critical value (with confidence level of 95%).

  • p-value of the test.

Author(s)

Giang Nguyen, Jonathan Cornelissen, Kris Boudt, and Emil Sjoerup.

References

Barndorff-Nielsen, O. E., and Shephard, N. (2006). Econometrics of testing for jumps in financial economics using bipower variation. Journal of Financial Econometrics, 4, 1-30.

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

Huang, X., and Tauchen, G. (2005). The relative contribution of jumps to total price variance. Journal of Financial Econometrics, 3, 456-499.

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

Examples

bns <- BNSjumpTest(sampleTData[, list(DT, PRICE)], IVestimator= "rMinRVar",
                   IQestimator = "rMedRQuar", type= "linear", makeReturns = TRUE)
bns


jonathancornelissen/highfrequency documentation built on Jan. 10, 2023, 7:29 p.m.