Panel structure daily data

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

png1
Posts: 6
Joined: Mon Jun 15, 2015 6:55 am

Panel structure daily data

Hello everybody,

hope someone can help me out. For a variety of reasons, my data is structured the following way. Each row resembles a firm and each column resembles a point in time. That basically means that each series object contains the data of one variable of all firms for one point in time. Each series object is named after the variable and point in time (for example: size_1990M6).

As we are normally using monthly data, we can easily use for loops (for example: for !year = 1990 to 2000 / for !month = 1 to 12) to analyze the data.

However for our new research project we only have daily data. The problem with daily data is that each year has a different amount of days, which makes it impossible to use the for loops like we did so far.

My question is whether or not there is a command which tells the for loop which series object contains the data of the last day of a month.

Second question: is there a command or expression which tells the for loop if a series object still belongs to a certain month.

Thank you in advance!

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

Re: Panel structure daily data

The questions are too abstract to give any real information.

However, it seems to be that you'd be much better off arranging your data as time-series data once it is in EViews, rather than keeping the current structure. Reshaping the page shouldn't be too difficult using the pagestack command. If you provide an example of the raw data, we can probably get you started.
Follow us on Twitter @IHSEViews

png1
Posts: 6
Joined: Mon Jun 15, 2015 6:55 am

Re: Panel structure daily data

So far I do not declare a "real" data structure. I just label my series objects according to the content and point in time.

This allows to compute the Fama French factors in a quite convenient way. Those factors resemble portfolios which are build once per year (end of june) based on a specific variable (for example firm size). After building one portfolio we calculate the return over the next 12 months and rebalance it afterwards.

As one series object contains for example the firm size of June 1990, I can easily calculate the quantiles in order to build different portfolios. Afterwards I just use the sample command to restrict my sample according to a specific quantile and can calculate the return of the restricted sample = specific portfolio.

If I transform my data into a timeseries I can not use the sample command anymore.

Return to “Programming”

Who is online

Users browsing this forum: javvk and 6 guests