Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting Compustat 9 digit to 6 digit.

    Many other databases have cusip but they use 6 digit cusip. So while merging I convert the 9 digit cusip to 6 digit cusip. There is the converter in Compustat that does that (https://wrds-www.wharton.upenn.edu/l...sip-converter/) However, in the output it gives only 6 digit cusip for the 9 digit cusip input, instead of both the columns so its hard to match what is the corresponding 9 digit cusip for a 6 digit cusip. And, when I am converting it by extracting the first 6 characters of the 9 digit, I am getting many missing values while merging. What is the right way to convert 9 digit to 6 digit cusip?
    Emily Albom

  • #2
    My guess is probably due to different precision. Sometimes the two numbers may both appear to be "123456" but the one can actually be something like "123456.000000001". In those cases, the merge command will consider them not the same. One way to work around is to covert both of the id variables into 6-space long string variables, and use them as the merging id.
    Last edited by Ken Chui; 14 Sep 2023, 13:32.

    Comment

    Working...
    X