Testing for martingale difference hypothesis in high dimension
Testing for martingale difference hypothesis in high dimension
MartG_test() implements a new test proposed in Chang, Jiang and Shao (2023) for the following hypothesis testing problem: [REMOVE_ME]H0:{yt}t=1nisaMDSversusH1:{yt}t=1nisnotaMDS,[REMOVEME2] where MDS is the abbreviation of "martingale difference sequence".
MartG_test( Y, lag.k =2, B =1000, type = c("Linear","Quad"), alpha =0.05, kernel.type = c("QS","Par","Bart"))
Arguments
Y: An n×p data matrix Y=(y1,…,yn)′, where n is the number of the observations of the p×1
time series {yt}t=1n.
lag.k: The time lag K used to calculate the test statistic [See (3) in Chang, Jiang and Shao (2023)]. The default is 2.
B: The number of bootstrap replications for generating multivariate normally distributed random vectors when calculating the critical value. The default is 1000.
type: The map used for constructing the test statistic. Available options include: "Linear" (the default) for the linear identity map and "Quad" for the map including both linear and quadratic terms. type can also be set by the users. See 'Details' and Section 2.1 of Chang, Jiang and Shao (2023) for more information.
alpha: The significance level of the test. The default is 0.05.
kernel.type: The option for choosing the symmetric kernel used in the estimation of long-run covariance matrix. Available options include: "QS" (the default) for the Quadratic spectral kernel, "Par" for the Parzen kernel, and "Bart" for the Bartlett kernel. See Chang, Jiang and Shao (2023) for more information.
Returns
An object of class "hdtstest", which contains the following components: - statistic: The test statistic of the test.
p.value: The p-value of the test.
lag.k: The time lag used in function.
type: The map used in function.
kernel.type: The kernel used in function.
Description
MartG_test() implements a new test proposed in Chang, Jiang and Shao (2023) for the following hypothesis testing problem:
where MDS is the abbreviation of "martingale difference sequence".
Details
Write x=(x1,…,xp)′. When type = "Linear", the linear identity map is defined as ϕ(x)=x.
When type = "Quad", ϕ(x)={x′,(x2)′}′
includes both linear and quadratic terms, where x2=(x12,…,xp2)′.
We can also choose ϕ(x)=cos(x) to capture certain type of nonlinear dependence, where cos(x)=(cosx1,…,cosxp)′.
See 'Examples'.
Examples
# Example 1n <-200p <-10X <- matrix(rnorm(n*p),n,p)res <- MartG_test(X, type="Linear")res <- MartG_test(X, type=cbind(X, X^2))#the same as type = "Quad"## map can also be defined as an expression in R.res <- MartG_test(X, type=quote(cbind(X, X^2)))# expr using quote()res <- MartG_test(X, type=substitute(cbind(X, X^2)))# expr using substitute()res <- MartG_test(X, type=expression(cbind(X, X^2)))# expr using expression()res <- MartG_test(X, type=parse(text="cbind(X, X^2)"))# expr using parse()## map can also be defined as a function in R.map_fun <-function(X){X <- cbind(X, X^2); X}res <- MartG_test(X, type=map_fun)Pvalue <- res$p.value
rej <- res$reject
References
Chang, J., Jiang, Q., & Shao, X. (2023). Testing the martingale difference hypothesis in high dimension. Journal of Econometrics, 235 , 972--1000. tools:::Rd_expr_doi("doi:10.1016/j.jeconom.2022.09.001") .