selecting firms who derive more than 50% of sales from main business segment

208 views
Skip to first unread message

Umair Khan

unread,
Feb 10, 2015, 11:09:32 AM2/10/15
to wrd...@googlegroups.com
Hi,

 I want to select manufacturing firms in compustat with sic code 20-39.  Firms should derive more than 50% of sales from main business segment. I am able to download a file of all firms but I don't how to check or select firms who are deriving more than 50% of sales from main business segment. Do you have idea how to do that? Many thanks

Best
Umair

joost impink

unread,
Feb 10, 2015, 12:28:11 PM2/10/15
to wrd...@googlegroups.com
hi Umair,

The segment info you need can be found in Compustat wrds_segmerged, see: http://wrds-web.wharton.upenn.edu/wrds/tools/variable.cfm?library_id=129&file_id=77282 which can be matched on gvkey and datadate on Compustat Fundamental Annual.

Note that you probably want to filter on srcdate = datadate (as segment disclosures for a given year appear in multiple 10-Ks) and drop geo segments

best regards,

Joost

Umair Khan

unread,
Feb 11, 2015, 7:57:14 AM2/11/15
to wrd...@googlegroups.com
Hi Joost,

Super thanks for the reply. I am sorry, I forgot to mention that I am looking for firms in time window 1994-2005. The Compustat wrds_segmerged has data from 2007 onwards. using historical segment window would work for me? following search window:


 Really sorry for asking very basic question but I am new to this WRDS database. Thanks alot for your patience and help.

Best regards
Umair

joost impink

unread,
Feb 11, 2015, 8:33:02 AM2/11/15
to wrd...@googlegroups.com
hi Umair,

There are two datasets of wrds_segmerged. In:

/wrds/comp/sasdata/naa/segments_current - This data goes back to 2008
Listed under COMP:NAA:segments_current [ /wrds/comp/sasdata/naa/segments_current ] http://wrds-web.wharton.upenn.edu/wrds/tools/variable.cfm?library_id=129

/wrds/comp/sasdata/d_seghist
Listed under COMP:D_SEGHIST [ /wrds/comp/sasdata/d_seghist ] http://wrds-web.wharton.upenn.edu/wrds/tools/variable.cfm?library_id=7

The one in d_seghist goes back to 1976. I was able to download the 'full' segment dataset with this code:

/* download segment files using default library assignment for library comp */
%let wrds = wrds.wharton.upenn.edu 4016;options comamid = TCP remote=WRDS;
signon username=_prompt_;
rsubmit; proc download data=comp.wrds_segmerged out=newcomp.wrds_segmerged;run; endrsubmit;

So, the 'full' dataset is selected over the 'current' (8-year) dataset; possibly because the directory of the full dataset is listed before the current one in the default library 'comp' assignments (the comp library consists of 26 directories -- see the log after signon).

best regards,

Joost




--
Forum home on www.wrds.us - http://www.wrds.us/index.php/forum_wrds/
 
All posts are moderated.
---
You received this message because you are subscribed to the Google Groups "wrdssas" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wrdssas+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/wrdssas.
To view this discussion on the web visit https://groups.google.com/d/msgid/wrdssas/b593f272-5fa7-4874-9f7d-349a7dab469c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Umair Khan

unread,
Feb 11, 2015, 8:43:01 AM2/11/15
to wrd...@googlegroups.com
you are great .... Thanks so much for the help.

Best Regards
Umair
Reply all
Reply to author
Forward
0 new messages