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!
Importing and analyzing multiple files (version 6)
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
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)
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.
Re: Importing and analyzing multiple files (version 6)
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)
The commands are pageload and copy. Both are documented in the Command Reference.
Re: Importing and analyzing multiple files (version 6)
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!
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)
Hard to know, without knowing what you've done.What do I do wrong?
Re: Importing and analyzing multiple files (version 6)
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:
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,
Code: Select all
open the first file
%file = @word(%filenames,1)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)
As you point out, @word isn't available in EV6. Nor is there an easy replacement.
Who is online
Users browsing this forum: No registered users and 1 guest
