全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件
1325 2
2022-09-27
#导入数据
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)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2022-9-28 08:19:54
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2022-9-29 13:36:00
好贴就点赞,一起拿积分
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群