BookmarkSubscribeRSS Feed
nurul
Calcite | Level 5

Just wondering if anyone has codes to get data from WRDS>Compustat>North America

I would like to get Fundamentals Quarterly, with date range Jan/2010 to Dec/2011,

Screening Variables:

Consolidation Level         C           

Industry Format                              INDL      FS         

Data Format       STD      

Population Source           D           

Quarter Type     Fiscal View        

Currency              USD     

Company Status               Active  Inactive

I am looking for variables like Company Name, Current Assets-Total (ACTQ), Non-Current Assets-Total (ANCQ), Assets-Total (ATQ), etc..

 

I have company codes such as CIK (0000731859, 0001097575, 0000827165, 0001102238, 0001114605, 0000810208, …… ) and Ticker (and also CUSIP) for the companies that I am looking for.

Can I use these codes?

Or I have to get GVKEY to use in SAS code if I want to get the data, if so, any suggestions on how to get GVKEY using CIK or Ticker or CUSIP

 

Thanks and appreciate your help

 

Regards,

Nurul

 

6 REPLIES 6
Reeza
Super User

I thought WRDS had a library of programs that beginners could use?

 

EDIT: searching WRDS Tutorial on your favourite search engine will bring up the tutorials and the link to available resources.

mkeintz
Jade | Level 19

Why would you not use the WRDS web query form for Compustat data, which allows you to specify all the filters you mention?  You can also have a local text file of CUSIPs  (and a second one of tickers, and third one of CIK's) to drive the company selection in the web query.  Just choose the "upload a plain text file" option.

 

It even produces SAS (or STATA or CSV, or XLSX) files for download.

 

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
nurul
Calcite | Level 5

Thanks for the response. That's how I am collecting the data, but I thought if any one have codes that I could borrow would be useful, as it will save time. Thanks

Reeza
Super User

The approach is correct, but WRDS/COMPUSTAT has it's own library of macros and SAS programs that you should probably use. They're likely to be tested and set up for WRDS specifically already. 

nurul
Calcite | Level 5

Hi,

 

Thanks for the response. Do you know exactly where in WRDS the library of macros are located? 

 

Thanks 

Reeza
Super User

I would assume under Support/Sample Programs but you have to be logged in and I don't have an account.

https://wrds-web.wharton.upenn.edu/wrds/support/Data/_003Sample%20Programs/index.cfm

 

 

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 2448 views
  • 0 likes
  • 3 in conversation