Management of 14-years panel data of weekly returns

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

VALIA
Posts: 7
Joined: Mon Jul 18, 2011 12:55 pm

Management of 14-years panel data of weekly returns

Postby VALIA » Thu Nov 14, 2013 7:29 am

I need to use the residuals from the following regression (weekly stock return is the dependent variable and weekly market return, its leads and lags are the explanatory variables):
r_(i,t)=α_i+β_(1,i) r_(m,t-2)+β_(2,i) r_(m,t-1)+β_(3,i) r_(m,t)+β_(4,i) r_(m,t+1)+β_(5,i) r_(m,t+2)+ε_(i,t).
I have unbalanced panel spanning 14 years time period with number of companies ranging from 37 to 900 in different years and 52 weekly returns for each company (See attached). The structure of my data set is currently as follows: company ID (name) in column and 52 returns in rows. I have difficulties with this simple task and need your advice on the following:
Is it possible to structure data as a panel with companies’ ID as a cross-section identifier and weeks as date identifier for the full set of 14 years (the panel will be massive), i.e.,
year 1 comp1------ret. Week1
Year1 Comp1------ret. Week2
…………………………………………….
Year 1 Comp 1 ------ret week 52
Year 1 Comp 2------returns
Year 1 Comp N -----returns
………………………………………….
Year 2 Comp 1 – ret week 1 etc.
How is it possible to link weekly index return to the corresponding weekly company return? Index returns are the time series, without the cross-section ID required for the panel data structure.
If there is a better way of running the regression, I would appreciate your suggestions. I was thing about the possibility of doing this year –by- year (which might be more time and labour consuming) but still have a problem with index returns (I try to stack data on the annual basis and add index as new variable. However, the corresponding index values feel only 52 weeks for the first company with rest of sells being “NA”, it is also attached.).
Thank you!
Attachments
Panel data returns question.docx
(582.1 KiB) Downloaded 253 times

Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests