Dear Stata Community,
When dealing with merged data from CRSP and Compusstat.
Is it generally better to compute ratio's and returns by permno, permco or by cusip? And what would you say is the best way to deal with duplicates?
Where each permno is a permanent identifier for each security and each cusip is a identifier for each firm that may change over time.
For the sake of simplicity consider the following data example;
Here I have a security who's cusip and globalkey changes yet it's permno and permco remains the same.
So the duplicate is caused by the fact that in the year 1989, I have two different cusips which both report about the same permno.
Thank you in advance for your time and consideration,
Kind regards, Julien
When dealing with merged data from CRSP and Compusstat.
Is it generally better to compute ratio's and returns by permno, permco or by cusip? And what would you say is the best way to deal with duplicates?
Where each permno is a permanent identifier for each security and each cusip is a identifier for each firm that may change over time.
For the sake of simplicity consider the following data example;
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long(globalkey lpermno lpermco) int fyear str9 cusip str29 companyname float(totalassets ib) 1338 12125 5180 1982 "02199Y201" "ALTA ENERGY CORP-OLD" 4.579 .078 1338 12125 5180 1983 "02199Y201" "ALTA ENERGY CORP-OLD" 6.401 .027 1338 12125 5180 1984 "02199Y201" "ALTA ENERGY CORP-OLD" 7.185 .145 1338 12125 5180 1985 "02199Y201" "ALTA ENERGY CORP-OLD" 8.109 -.143 1338 12125 5180 1986 "02199Y201" "ALTA ENERGY CORP-OLD" 6.691 -.094 1338 12125 5180 1987 "02199Y201" "ALTA ENERGY CORP-OLD" 7.527 -.046 1338 12125 5180 1988 "02199Y201" "ALTA ENERGY CORP-OLD" 5.701 -1.564 1338 12125 5180 1989 "02199Y201" "ALTA ENERGY CORP-OLD" 5.338 -.173 20063 12125 5180 1989 "021270301" "ALTA ENERGY CORP" . . 20063 12125 5180 1990 "021270301" "ALTA ENERGY CORP" 19.125 -.078 20063 12125 5180 1991 "021270301" "ALTA ENERGY CORP" 28.702 1.175 20063 12125 5180 1992 "021270301" "ALTA ENERGY CORP" 43.792 .481 20063 12125 5180 1993 "021270301" "ALTA ENERGY CORP" 58.467 -.858 end
Here I have a security who's cusip and globalkey changes yet it's permno and permco remains the same.
So the duplicate is caused by the fact that in the year 1989, I have two different cusips which both report about the same permno.
Thank you in advance for your time and consideration,
Kind regards, Julien
Comment