Importing and analyzing multiple files (version 6)

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

met
Posts: 14
Joined: Fri Sep 02, 2011 7:44 am

Importing and analyzing multiple files (version 6)

Postby met » Sun Sep 11, 2011 11:49 am

Hi,

I have many txt files each containing intra-day data of a specific stock on a specific day! For example AAPL040611 contains all quotes, prices, spreads, etc for Apple on the April, 6th 2011.
I want eViews to automatically import the files and organize them so that i can for example calculate the mean spread over the whole period.
Unfortunately I have no experience with eViews nor programming but need to have the investigation done as soon as possible.
I guess a for loop would do it? Can anyone help me with the commands?
I changed the working directory to the folder containing the files and opened a list with the filenames but then I got stuck...
I use version 6.


Thanks for helping!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Importing and analyzing multiple files (version 6)

Postby EViews Gareth » Sun Sep 11, 2011 12:13 pm

This would be much easier in EViews 7. But in 6 the best thing to do is to use pageload to bring in the files on at a time, and then copy to bring them into the same page.

met
Posts: 14
Joined: Fri Sep 02, 2011 7:44 am

Re: Importing and analyzing multiple files (version 6)

Postby met » Mon Sep 12, 2011 1:20 am

Where do I start? Can you help me with the commands? Sorry I'm desperate...

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Importing and analyzing multiple files (version 6)

Postby EViews Gareth » Mon Sep 12, 2011 8:04 am

The commands are pageload and copy. Both are documented in the Command Reference.

met
Posts: 14
Joined: Fri Sep 02, 2011 7:44 am

Re: Importing and analyzing multiple files (version 6)

Postby met » Mon Sep 12, 2011 10:58 am

Thanks so far Gareth! I make some slow progress...but still I don't manage to implement a for loop, importing my files, picking series having the same name and bringing those together in one page. (for example picking from every file the series called "price" and dropping it to a specific page in the workfile).

Another very basic problem i encountered is to split my file by date. Remember that I have several thousand observation for each day (10 in total). I thought it should be quite easy with the sample function, however, the sample doesn't not contain any observation. What do I do wrong?

Thanks so much!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Importing and analyzing multiple files (version 6)

Postby EViews Gareth » Mon Sep 12, 2011 11:04 am

What do I do wrong?
Hard to know, without knowing what you've done.

met
Posts: 14
Joined: Fri Sep 02, 2011 7:44 am

Re: Importing and analyzing multiple files (version 6)

Postby met » Tue Sep 13, 2011 7:22 am

Yeah that's true! Fortunately I've solved the sampling problem, and it works fine now! For the loop I tried to do the same as in http://forums.eviews.com/viewtopic.php? ... lly#p16198! However, as it seems version 6 does not support "@wdir" and "@word"? I guess that "@wdir" can be replaced somehow by"shell(out=flist) dir /b" but I haven't found anything on "@word". I'm freaking out on this simple command:

Code: Select all

open the first file %file = @word(%filenames,1)
It seems that I'm not talented at all in this stuff! I hope you can help me a bit with my aforementionned problems to get my project going...

Thanks,

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Importing and analyzing multiple files (version 6)

Postby EViews Gareth » Tue Sep 13, 2011 7:40 am

As you point out, @word isn't available in EV6. Nor is there an easy replacement.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests