Handy Stata command to create Fama-French industry classifications based on SIC codes

See ffind written by Judson Caskey. Here is his website:
https://sites.google.com/site/judsoncaskey/data

The syntax is as follows (download Help file here):
ffind sic, newvar(ffi) type(30)

type(30) means Fama_French 30 industries classification. Type must be 5, 10, 12, 17, 30, 38, 48 or 49.

This command does not support installation using ssc install. Type the following in Stata to install the command:
net from https://sites.google.com/site/judsoncaskey/data
net install utilities.pkg

See here for equivalent SAS macro:
http://faculty-gsb.stanford.edu/dehaan/SAS.html

This entry was posted in Stata. Bookmark the permalink.

15 Responses to Handy Stata command to create Fama-French industry classifications based on SIC codes

  1. Jessica says:

    Hi Kai,
    Thank you for your post!
    However, it doesn’t work for me when I tried to install using the way you provided.

    “net from https://sites.google.com/site/judsoncaskey/data
    net install utilities.pkg”

    Please advice.

    Thanks.
    Jessica

  2. chen says:

    Hello Kai

    Your website really helps me . Thanks for this!

    I got a question, how can I divide the industries into two categories by using your tutorial, one is service and one is manufacturing?

    Thank you in advance.

    Chen

  3. Bo says:

    I tested it, and it should be ffind *, gen(**) type(***).
    replace * with the SIC code variable name in your data;
    replace ** with the ff grouping variable name you want to call;
    replace *** with the ff grouping choice, i.e. 12, 48, etc.

  4. mike says:

    if using newvar(), an error appears “option generate() required” so I think Bo was right.

  5. Jong says:

    Successfully installed the addon and used it, but for some reason it can only recognise 1 category? Am I missing something?

    I hope to use the 48 classifications, but it only returns “Almost nothing” or “Agriculture” while I am sure there are other industries in my dataset.

  6. Hang says:

    Hi Kai,
    I’ve recently discovered your blog. It is very helpful. However, I’m very new in data analysis. And I don’t understand why we have compute data by Fama – French industrial classification while we already have standard classification by industry such as SIC Code of America or CSRP data of China. I really appreciate it if you could provide some material for me to take a look in depth. Thanks so much.

    • Kai Chen says:

      A fair question. Oftentimes we follow prior research and don’t ask why, do we? I think this paper is a good source of the answer. Bhojraj, S., Lee, C. M. C. and Oler, D. K. (2003), What’s My Line? A Comparison of Industry Classification Schemes for Capital Market Research. Journal of Accounting Research, 41: 745–774. doi:10.1046/j.1475-679X.2003.00122.x

  7. Elena says:

    Hi Kai,

    I am very new to STATA. I need to transform SIC codes into Fama French classification for the companies in my dataset. Please let me know if my understanding is correct: if the code from the .ado file is to code the ffind command, what is the role of the syntax? I understand that it’s running the command “ffind” but I do not understand how. Could you explain what the output would be? Also, when trying to run the syntax, I encounter the following error: “invalid type”. How can I address that? Thanks!

    • Kai Chen says:

      Do you own homework on how to use ado file in Stata, and what syntax means for a command. The possible answer for your last question: SIC for this command should be of numeric type but SIC from Compustat is of string type. Make conversion before you use the command.

Leave a Reply

Your email address will not be published. Required fields are marked *