在网上发现好多童鞋问关于怎么用EVIEWS 做VR TEST,正好这次大作业有用到,所以写个简单的guide~
在eviews软件里面选file/open/programs. 打开附件里的这个vrtest.prg。程序就会自动打开一个源代码的窗口。
下面我们要在这个源代码的窗口改两个地方:
1)在step1-input里面有一行series x =ret_CHS_m ,把这个等号后面的名字改成你要做VR TEST的series的名字。
' Step1 - Input
smpl @all
series x =ret_CHS_m (改这里) ' set basic series to be tested. . (Create a new series called x, containing the series to be analysed by the variance ratio test.)
!q=16 ' set variance ratio return horizon q periods
' %first is first data obs to be used of basic series x
' %last is last data obs to be used of basic series x
' NO MORE INPUT REQUIRED FOR FOLLOWING CALCULATIONS
' *******************************************************************************
2)在Step 2 - Calculate Variance Ratio里有这行for %first %last 2008M1 2010M12,把后面的这个时间段改成你要检验的时间段。具体格式你可以随便做个test或者regression看eviews自动生成的那个时间段的格式是怎么写的
'Step 2 - Calculate Variance Ratio
for %first %last 2008M1 2010M12(改这里)
' start of sample adjusted for 1 period to calculate one-period returns, and !q periods for !q period horizon
好啦,然后就点run,你的eviews里面就自动会出现一个叫vrtest的table了
N(0,1) 2-sided N(0,1) 2-sided
Data period Nr base obs nq Horizon q VRq test stat Zq sign-level test stat Zq* sign-level
2008M1-2010M12 35 16 0.0600 -1.2634 0.20646 -0.9494 0.34242
附件列表