#导入数据
data=read.csv('C:\\Users\\Jing\\Desktop\\数据名称.csv',,header=T,encoding='UTF-8')
head(data)
#将数据对数收益率化
data=diff(log(data))
head(data)
#将待检验数置换为x
x=data
x=as.matrix(x)
x=na.omit(x)
#Ljung - Box test
Box.test(x,lag=10,type='Ljung')
#runs test 游程检验
#原假设:数据出现顺序随机
library(lawstat)
runs.test(x,alternative=c('two.sided'))
#Bartels test
bartels.test(x)
#Wild-bootstrapped AVR
#BDS test
library(tseries)
bds.test(x,m=3)
#R/S Hurst
#Panel VR test
library(vrtest)
Panel.VR(x)
#Mann–Kendall Trend Test
library(trend)
mk.test(x)
#Cox Stuart Test
#Automatic Portmanteau Test
library(vrtest)
Auto.Q(x)
#ADF test
library(tseries)
adf.test(x)
#ARCH 检验
library(FinTS)
ArchTest(x,lag=10)