Grouping Data By Day (eg Mondays, Tuesdays etc)

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

px41
Posts: 24
Joined: Wed Mar 02, 2011 7:44 pm

Grouping Data By Day (eg Mondays, Tuesdays etc)

Postby px41 » Wed Mar 02, 2011 8:30 pm

To who it may concern,

Hi Good Day,

I am using Eviews7 and I am trying to group data acording to days. I am using stock market data (daily prices). I know EViews7 has the "Wide+/-" option to click and it arranges time series data into columns (for a 7 day week its 7 coloumns with each column neatly listing each day eg. column 1 could mean mondays, column 2 could mean tues etc).

However I have a slight problem. The time series data that I have downloaded only contains data for trading days and nothing for non-trading days. Thus, for example when i view this in the "wide" format the first, say 4 ROWS, for column 1 lists wednesdays, but then the 5th-9th rows for coloumn 1 when i inspect it, actually begins to list data for thursdays etc.

The days that should be dedicated to a coloumn gets messed up since the data I imported is only a series of AVAILABLE data and there is NO RECORD ( not even a "N/A" or a dash) for non-trading days. There is simply only a list of traded days' closing prices.

So my question is, how can I organize my data in such a way so that in the "wide" view I can have ONLY mondays in column 1, column 2 only tuesdays....until column 5 only friday data. The point is to have columns dedicated to days. For eg column 1 need not be Mondays in particular but it NEEDS to be consistent in whatever day it begins listing. Its ok if I end up with a column 6 (saturday) and column 7 (sunday) with no data or "N/A"s or "-"(dashes) because these are non-trading days anyways. My main concern is to get my data ordered chonologically by days.

I hope i have explain the nature of my problem adequately. If further explanation is needed I will be glad to give it. I am glad for any help as the alternative is to go through literally thousands of lines of excel data manually. If I can do it through Eviews this would speed up my cause a hundred fold!

Thanking you for your help in advance.

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

Re: Grouping Data By Day (eg Mondays, Tuesdays etc)

Postby EViews Gareth » Wed Mar 02, 2011 8:50 pm

Any chance you could attach your workfile?

px41
Posts: 24
Joined: Wed Mar 02, 2011 7:44 pm

Re: Grouping Data By Day (eg Mondays, Tuesdays etc)

Postby px41 » Thu Mar 03, 2011 8:21 am

Sure, here is one of my workfiles. It represents the data for 1 of the companies i'm looking at (and I have 40 like these to analyze!). Thank you soo much if indeed my problem can be fixed!
Attachments
AGOSTINI'S_LIMITED.csv
It's essentally time series data with gaps, these gaps mess up the neat grouping of data.
(38.57 KiB) Downloaded 249 times

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

Re: Grouping Data By Day (eg Mondays, Tuesdays etc)

Postby EViews Gareth » Thu Mar 03, 2011 9:12 am

Ah, I see.

I'm not sure if this can be fixed easily. The Wide +/- button predates irregular workfiles, and is not something that gets used that often (you're the first person I've heard of who uses it!).

I'll bring it to the attention of the relevant people though.

px41
Posts: 24
Joined: Wed Mar 02, 2011 7:44 pm

Re: Grouping Data By Day (eg Mondays, Tuesdays etc)

Postby px41 » Thu Mar 03, 2011 8:19 pm

Ha ha ha, wow it's that seldom used? It's seems like a pretty handy option nevertheless. Thank you very much, I do hope it can be fixed.

I was thinking though: When you create a new work file in Eviews7 you can set the interval and frequency for your time series data. So I wondered, is there a way to import data that would map onto the dates within the predefined interval while also leaving empty the dates for which there is no data? (as in my case). Just a thought, but I'll leave that up to the experts. Guess I will keep monitoring this post for future responses.

Thanks again very much!

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

Grouping Data By Day (eg Mondays, Tuesdays etc)

Postby EViews Gareth » Thu Mar 03, 2011 8:23 pm

Yep, just create a new page with the desired regular frequency, then copy your irregular series over to it.

px41
Posts: 24
Joined: Wed Mar 02, 2011 7:44 pm

Re: Grouping Data By Day (eg Mondays, Tuesdays etc)

Postby px41 » Sat Mar 05, 2011 12:36 am

Alright, I'll try it out and hopefully it'll work. If it does, that'll be the fix I'm looking for. Thank you so much again for the advice. Will let you know if it works or if I need any help.

px41
Posts: 24
Joined: Wed Mar 02, 2011 7:44 pm

Re: Grouping Data By Day (eg Mondays, Tuesdays etc)

Postby px41 » Sat Mar 05, 2011 12:40 pm

Good Day Gareth,

I tried creating a new workfile and importing the data. This worked just perfectly for one of my files and is exactly what I want for all my files. However, for another file I get "unmatched" dates when importing the data. When I first tried importing this file i got an error: "Syntax error: unexpected character "" in file option settings". What is this about? I downloaded and saved all my data files in the same manner so I can't figure out why one imports without problem and others do.

Anyways, I copied and pasted the data over into a new excel file and tried importing again, I didn't get the above error but at the final step it says something like 144 source observations will be discarded if I continue. Then there is a prompt asking "Resize destination file now?" It freezes then crashes if I click "yes", discards my observations if I click "no". How can I get around this? I'm pretty sure my start and end dates are a large enough interval to contain all the observations I wish to import, so I can't imagine why resizing is needed. I'm not sure how to fix this because I don't know what's the problem. Attached is a print screen of what I mean. Thank you again for all your help!
Attachments
Unmatched.jpg
These "unmatched" dates result in the discarding of a total of 144 valuable data observations.
Unmatched.jpg (86.39 KiB) Viewed 11092 times
Syntax error.jpg
I sort of got around this but don't know why it happens.
Syntax error.jpg (12.32 KiB) Viewed 11092 times

px41
Posts: 24
Joined: Wed Mar 02, 2011 7:44 pm

Re: Grouping Data By Day (eg Mondays, Tuesdays etc)

Postby px41 » Sat Mar 05, 2011 1:03 pm

Hey Gareth,

I found the problem. Apparently, there's was a misclassification in the reporting of the data stemming from my data source. They used a 7-day week where a 5-day week should have been used. This caused my interval to be too small as I was working with a 5-day week. I didn't bother to delete the above posts since in the event some poor soul encounters the same problems I do, hopefully he can find some relief in this post!

Thank you again for all your help Gareth!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests