How to calculate a firm's age?

6,159 views
Skip to first unread message

singhalc

unread,
Mar 7, 2017, 8:52:22 PM3/7/17
to wrdssas
Hello,

I need to calculate a firm's age. I have the Compustat fund. annual data which gives me GVKEY and SIC. The variables IPODATE in this dataset has lots of missing values. How can I use CRSP dataset to get firm age and then merge it with my Compustat dataset? I want to do this for firms within a specific range of industries {manufacturing firms within range SIC=2000 to SIC=3999] and not for the entire population. Thank you!

PS: I use Stata and not SAS but I think I can figure out how to translate code into Stata. Or if this can be done without any code, that would be great!

Kevin Butler

unread,
Mar 10, 2017, 8:10:18 AM3/10/17
to wrdssas
/*  Firm age: firmage */
/* append st_date (start date) from crsp stocknames to 'getAge' dataset (needs to have permno and datadate) */
proc sql
;
    create table withAge
   
as select distinct a.*,
        b
.st_date, b.end_date
   
from getAge a
        left join crsp
.stocknames b
    on a
.permno = b.permno and
        b
.st_date <= a.datadate <= b.end_date;
quit
;


/* compute firm age */
data withAge  
(drop = st_date end_date);
   
set withAge;
    firmage
=yrdif(st_date, datadate, 'ACT/ACT');
run
;

Abdul Qayyum

unread,
Nov 25, 2017, 1:30:44 PM11/25/17
to wrdssas
hello dear ,
what is "crsp.stocknames" where can i download it or i have to create it ? 
i can not find it on wrds . 
any help will be appreciated. 
good day

att...@balogh.net

unread,
Nov 27, 2017, 10:36:31 AM11/27/17
to wrdssas
Abdul,

  CRSP.stocknames is the CRSP Company Names with Effective Name Dates dataset that you should find in WRDS if you have CRSP access.

  As a remark on the original post. please note that the starting date for CRSP price data and IPO date are at best proxies for firm age, but they are not the same. Very few firms are founded in the year of their IPO. Jay Ritter has a dataset on his web site with the actual founding dates for over 12,000 IPO firms since 1975.

Attila
Reply all
Reply to author
Forward
Message has been deleted
0 new messages