Help regarding portfolio formation
Posted: Fri Jun 28, 2013 5:48 am
Hello,
I am working with a crossid x data panel workfile. For 508 firms, I have data regarding sales, R&D expenditures and stock prices from 1990 until 2012. For every firm every year I have calculated the so called "R&D intensity" which is a firms R&D expenditures divided by sales. Also, I have a series containing each firms R&D intensity-rank relative to other firms that year (e.g. smpl 1990 if ranks>0.5 restricts the sample to the 50% most R&D intensive firms for 1990)
So far so good, the problem is that I would like to create 2 portfolios each year containing the 50% least intensive and 50% most intensive firms, so that I can retrieve information of the accumulated portfolio price for year 0, 1, 2 and 3. The biggest problem I am facing so far is that when I change the sample to the next year, different firms make up the portfolios so I can't calculate the price of (for example) portfolio 1990-high for year 1, 2 and 3.
As a bonus: is there an efficient way to store the prices in a new sort of panel workfile like this:
portfolio1990-high-year0 : 10
portfolio1990-high-year1 : 11
portfolio1990-high-year2 : 14
portfolio1990-high-year3 : 17
portfolio1990-low-year0 : 9
portfolio1990-low-year1 : 8
portfolio1990-low-year2 : 10
portfolio1990-low-year3 : 15
portfolio1991-high-year0 : 14
etc.
Thanks in advance for any help!
I am working with a crossid x data panel workfile. For 508 firms, I have data regarding sales, R&D expenditures and stock prices from 1990 until 2012. For every firm every year I have calculated the so called "R&D intensity" which is a firms R&D expenditures divided by sales. Also, I have a series containing each firms R&D intensity-rank relative to other firms that year (e.g. smpl 1990 if ranks>0.5 restricts the sample to the 50% most R&D intensive firms for 1990)
So far so good, the problem is that I would like to create 2 portfolios each year containing the 50% least intensive and 50% most intensive firms, so that I can retrieve information of the accumulated portfolio price for year 0, 1, 2 and 3. The biggest problem I am facing so far is that when I change the sample to the next year, different firms make up the portfolios so I can't calculate the price of (for example) portfolio 1990-high for year 1, 2 and 3.
As a bonus: is there an efficient way to store the prices in a new sort of panel workfile like this:
portfolio1990-high-year0 : 10
portfolio1990-high-year1 : 11
portfolio1990-high-year2 : 14
portfolio1990-high-year3 : 17
portfolio1990-low-year0 : 9
portfolio1990-low-year1 : 8
portfolio1990-low-year2 : 10
portfolio1990-low-year3 : 15
portfolio1991-high-year0 : 14
etc.
Thanks in advance for any help!