Page 1 of 1

Import data with start and end date in columns

Posted: Wed May 03, 2017 2:40 am
by reep
Hello,

I have text file in the following format:
isin startdate enddate volume art
xyz 2002q1 2006q3 100 10
zas 2001q1 2016q3 200 50
...

I would like to have import this file and create time series for every isin from the start to enddate. The variables volume and art should be the same for every single observation. How can I accomplish this?

Thanks.

Re: Import data with start and end date in columns

Posted: Wed May 03, 2017 8:38 am
by EViews Gareth
Do you wish them to be on the same page (meaning that there are lots of NAs given the differing start dates and end dates) or different pages?

Are they all the same frequency?

Re: Import data with start and end date in columns

Posted: Wed May 03, 2017 11:36 pm
by reep
Yes, I would like to have them on the same page.
Yes, the frequency is always quartely; data range is from 2003 to 2016.

Re: Import data with start and end date in columns

Posted: Thu May 04, 2017 8:10 am
by EViews Gareth

Code: Select all

wfcreate q 2003 2016 %list = @wread("c:\temp\test.txt") for %ser {%list} %sname = @word(%ser,1) %start = @word(%ser,2) %end = @word(%ser,3) %vol = @word(%ser,4) %art = @word(%ser,5) smpl {%start} {%end} series {%sname}_vol = @val(%vol) series {%sname}_art = @val(%art) smpl @all next

Re: Import data with start and end date in columns

Posted: Fri May 05, 2017 1:24 am
by reep
Thanks a lot!