copying from multiple pages

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

copying from multiple pages

Postby met » Fri Sep 16, 2011 2:53 pm

Hi,

I have a workfile with 6 pages. For simplicity reasons let's say that each page stores for a specific stock, its share price on 10 dates.
What is the best way to pick the share prices of each stock on a given day, copy the prices to a new workfile and calcutate the mean share price of all 6 stocks on a specific day? Was using several pages in one workfile the right start anyway? Programming commands would be useful as I have to repeat the step.

My dataset is little bit more complicated as, among others, it involves multiple prices per day (unstructured workfile, using version 6), however I guess the method should be similar!?

A different question: Is there any way to aggregate unregular millisecond stamped observations to a regular minute frequency?

Thanks for helping again!

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

Re: copying from multiple pages

Postby EViews Gareth » Fri Sep 16, 2011 2:55 pm

It isn't clear what you're asking here, but perhaps you just need to use the copy command?

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

Re: copying from multiple pages

Postby met » Fri Sep 16, 2011 4:30 pm

Ok sorry! I try again.

I would upload the workfile but unfortunately I'm currently at home.

I have 1 workfile with 6 pages. Each page contains data on one stock which I copied from Excel. So data on Page 1 on Stock A would look like this for example.

Date-----------------Time--------Eff_Spread
09/01/2009 ------ 11:05:02.540 ------ 6.71
09/01/2009 ------ 15:42:05.020 ------ 6.79
... ... ...
09/10/2009 ------ 09:02:50:110 ------ 6.36
09/10/2009 ------ 12:20:04:000 ------ 6.35
09/10/2009 ------ 14:17:17.710 ------ 6.39

Now, I want Eviews to pick from every page (from every stock) the observations on 09/01/2009, calculate the mean spread per share on that day and store the results somewhere, giving me the average spread per day for each share

Here: mean eff_spread for stock A on 09/10/2009: 6.75 bps

Hope it was somehow more understandable now.

Thank you!

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

copying from multiple pages

Postby EViews Gareth » Fri Sep 16, 2011 4:51 pm

Yep, you want the copy command to copy from your source pages to a destination page with a single observation for the day you're interested in.

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

Re: copying from multiple pages

Postby met » Sat Sep 17, 2011 2:05 pm

Probably stupid question but what is the best way to get the single observation (mean of a specific day) ? Getting the mean of the sample day is not the problem but when i create a new series for the mean Eviews of course keeps the number of observations in the sample and fills it up with the mean of the total sample. For example when I have 3 observations and the mean is 9, i get
1. 9
2. 9
3. 9
etc
rather than
1. 9

An way over frequency conversion is not possible in Eviews 6? So that when i copy into a series containing the 10 days of my observation period, EViews would automatically aggregate the intra-day data to a daily frequency?

Thanks Gareth!

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

copying from multiple pages

Postby EViews Gareth » Sat Sep 17, 2011 4:07 pm

Ah. Yes, in EViews 6 this is going to be tricky. Easiest thing to do might be to upgrade to EViews 7, which can handle intra-day data.

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

Re: copying from multiple pages

Postby met » Mon Sep 19, 2011 9:08 am

Ok. Would EViews 7 then be able to automatically convert by irregular millisecond time series into a regular second (millisecond??) stamped intra-day series?
Could you provide me the solution to my question about the mean into a single observation problem in my last post?

Thank you!

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

Re: copying from multiple pages

Postby EViews Gareth » Mon Sep 19, 2011 9:20 am

EViews 7 won't handle regular millisecond data. It will let you go from millisecond irregular to a minute regular though.

As I said before, to get the mean into a single observation, you're really just doing frequency conversion (and/or general match-merge copying). Just use the copy command to copy from your source (with multiple observations) into your destination (with a single observation) and tell EViews to use averaging as the contraction method.

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

Re: copying from multiple pages

Postby met » Mon Sep 19, 2011 1:07 pm

Here is what I do:

Code: Select all

copy(c=a) hannoverruck\wprice_impact day_average\
Hannoverruck is my source page (unstructured, 67859 observations)
day_average my destination page(unstructured, 1 observation)
wprice_impact my series

However, the observation in the series in the destination file is only replaced by the first observation of the observations in my source file, not the mean of the observations!?

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

Re: copying from multiple pages

Postby EViews Gareth » Mon Sep 19, 2011 1:50 pm

You probably need to do a general match merge copy, rather than a frequency conversion.

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

Re: copying from multiple pages

Postby met » Wed Sep 21, 2011 2:51 pm

Hi,
I finally should get access to EVIews 7 tomorrow! So how should i start for my project! How can I convert my irregular intra-day data to a regular spaced series? Why did you wrote millisecond to minute would be possible? I thought version 7 could handle second stamped data?

Thanks for helping!
Met

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

Re: copying from multiple pages

Postby EViews Gareth » Wed Sep 21, 2011 3:24 pm

millisecond to second would also be possible.

You'll have a page with your millisecond data. In that page you'll have a series with the time stamp. You'll create a new page that is regular second (or minute). You'll do a general match merge copy from the first page to the second using the timestamp series that the source ID, and @date for the destination ID. (note that, @date is a keyword for a series containing the date/time stamp in the regular page).


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests