Learn R Programming

highfrequency (version 0.5.3)

AJjumptest: Ait- Sahalia and Jacod (2009) 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 the theory of Ait-Sahalia and Jacod (2009) (AJ). It consists in comparing the multipower variation of equispaced returns computed at a fast time scale (\(h\)), \(r_{t,i}\) (\(i=1, \ldots,N\)) and those computed at the slower time scale (\(kh\)), \(y_{t,i}\)(\(i=1, \ldots ,\mbox{N/k}\)).

They found that the limit (for \(N\) \(\to\) \(\infty\) ) of the realized power variation is invariant for different sampling scales and that their ratio is \(1\) in case of jumps and \(\mbox{k}^{p/2}-1\) if no jumps. Therefore the AJ test detects the presence of jump using the ratio of realized power variation sampled from two scales. The null hypothesis is no jumps.

Function returns three outcomes: 1.z-test value 2.critical value under confidence level of \(95\%\) and 3.p-value.

Assume there is \(N\) equispaced returns in period \(t\). Let \(r_{t,i}\) be a return (with \(i=1, \ldots,N\)) in period \(t\).

And there is \(N/k\) equispaced returns in period \(t\). Let \(y_{t,i}\) be a return (with \(i=1, \ldots ,\mbox{N/k}\)) in period \(t\).

Then the AJjumptest is given by: $$ \mbox{AJjumptest}_{t,N}= \frac{S_t(p,k,h)-k^{p/2-1}}{\sqrt{V_{t,N}}} $$

in which,

$$ \mbox{S}_t(p,k,h)= \frac{PV_{t,M}(p,kh)}{PV_{t,M}(p,h)} $$

$$ \mbox{PV}_{t,N}(p,kh)= \sum_{i=1}^{N/k}{|y_{t,i}|^p} $$

$$ \mbox{PV}_{t,N}(p,h)= \sum_{i=1}^{N}{|r_{t,i}|^p} $$

$$ \mbox{V}_{t,N}= \frac{N(p,k) A_{t,N(2p)}}{N A_{t,N(p)}} $$

$$ \mbox{N}(p,k)= \left(\frac{1}{\mu_p^2}\right)(k^{p-2}(1+k))\mu_{2p} + k^{p-2}(k-1) \mu_p^2 - 2k^{p/2-1}\mu_{k,p} $$

$$ \mbox{A}_{t,n(2p)}= \frac{(1/N)^{(1-p/2)}}{\mu_p} \sum_{i=1}^{N}{|r_{t,i}|^p} \ \ \mbox{for} \ \ |r_j|< \alpha(1/N)^w $$

$$ \mu_{k,p}= E(|U|^p |U+\sqrt{k-1}V|^p) $$

\(U, V\): independent standard normal random variables; \(h=1/N\); \(p, k, \alpha, w\): parameters.

Usage

AJjumptest(pdata, p=4 , k=2, align.by= NULL, align.period = NULL, alpha_multiplier = 4, 
makeReturns= FALSE, ...)

Arguments

pdata

a zoo/xts object containing all prices in period t for one asset.

p

can be chosen among 2 or 3 or 4. The author suggests 4. 4 by default.

k

can be chosen among 2 or 3 or 4. The author suggests 2. 2 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].

alpha_multiplier

alpha multiplier

makeReturns

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

...

additional arguments.

Value

list

Details

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}\sigma_{u}dW_{u} + Z_t $$ where \(a\) is the drift term, \(\sigma\) denotes the spot volatility process, \(W\) is a standard Brownian motion and \(Z\) is a jump process defined by: $$ \mbox{Z}_{t}= \sum_{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.

The Ait-Sahalia and Jacod test is that: Using the convergence properties of power variation and its dependence on the time scale on which it is measured, Ait-Sahalia and Jacod (2009) define a new variable which converges to 1 in the presence of jumps in the underlying return series, or to another deterministic and known number in the absence of jumps. (Theodosiou& Zikes(2009))

References

Ait-Sahalia, Y. and Jacod, J. (2009). Testing for jumps in a discretely observed process. The Annals of Statistics, 37(1), 184- 222.

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.

Examples

Run this code
# NOT RUN {
data(sample_tdata)
AJjumptest(sample_tdata$PRICE, p= 2, k= 3, align.by= "seconds", align.period= 5, makeReturns= TRUE)
# }

Run the code above in your browser using DataLab