全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 EViews专版
4251 5
2009-03-22

在分析股票日交易数据时,按每周五天的格式输入,除周末以外的节假日是没有数据的,如何删除那些节日日期呢,恳请各位指点指点

毕业论文需要,比较急,在这里先谢过了

劳驾各位写得具体点哈

二维码

扫码加我 拉你入群

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

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

全部回复
2009-3-22 12:29:00

I also had this problem. But my advisor told me that it's impossible to handle the holiday problem by Eviews. Usually, there are two ways to solve the holiday problem:

First, you could use linear method to add the holiday missing data. For example, you can make the average by the day before and after. It is reasonable, but it may be bias.

Second, ignoring the holiday data for your dataset, which means deleting all holiday data for other variables. It is resonable for doing econometric analysis, but you need to pay more attention for the date of data.

二维码

扫码加我 拉你入群

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

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

2009-3-22 19:18:00
同意二楼的说法,我经常采用第二种方法,不知可知用什么软件可以处理这个问题吗
二维码

扫码加我 拉你入群

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

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

2009-3-23 15:44:00

谢谢!

请问第二种方法如何操作呢?

二维码

扫码加我 拉你入群

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

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

2009-3-29 09:08:00

Use the Matrix in Eview. For example: the sample period is 01/01/2009 to 01/31/2009, which means your should have 22 days'data.

Let's assume you have the daily Stock data and the daily Highest Temperature data.

The Stock data at least miss the new year' data (01/01/2009), so you will have 21 obs for Stock data and 22 obs for daily Highest Temperature data.

Now we have a matrix (22 rows and 5 columns): first column is for the date of Stock data, second column is for the value of Stock data, third column is for the date of Temperature and the forth column is for the value of Temperature.

' assign the group data into a matrix

matrix(22,5) xdata
for !x =1 to 22
xdata(!x,1)=date1(!x)
xdata(!x,2)=value(!x)
xdata(!x,3)=date2(!x)
xdata(!x,4)=temp(!x)
next

' the data in matrix column 1 & 5 is the data you need.
for !i = 1 to @rows(xdata)-1
  if xdata(!i,1) = xdata(!i,3) then
  xdata(!i,5) = xdata(!i,2)
  else  for !j = !i+1 to @rows(xdata)
            if xdata(!i,1) = xdata(!j,3) then
            xdata(!i,5) = xdata(!j,4)
            exitloop
            endif
        next
   endif
next

二维码

扫码加我 拉你入群

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

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

2010-12-10 13:59:34
thanks~~~~~~~~~~~~
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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