Access to the CSTHIST & COMPHIST data
Posted: 29 October 2014 10:48 AM   [ Ignore ]
Newbie
Rank
Total Posts:  8
Joined  2014-08-20

Hi everyone,

does anyone know whether there is a possibility to get access to the historic header data of Compustat (in particular HSTATE, CST_STATE, HFIC) with the WRDS web query (CCM Merged Database)? What other possibilities do I have to get this data?

Thank you very much in advance for your help?

Profile
 
 
Posted: 29 October 2014 11:10 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

hi,

The ‘main’ datasets are in the web interface. Datasets that are not included can be downloaded with SSH ( see http://sils.unc.edu/it-services/servers/using-ssh ), or with SAS (remote submit).

First find the ‘location’ of the dataset using ‘support’, ‘dataset list’,  and selecting the library (for example. ‘CRSP quarterly update’), which will take you to an overview page with the datasets in that library. For example: http://wrds-web.wharton.upenn.edu/wrds/tools/variable.cfm?library_id=20

On that page you will find COMPHIST (the dataset you need) is under:  /wrds/crsp/sasdata/q_ccm

So with SSH you navigate to that folder, and then ‘drag and drop’ it to download to your machine.

With SAS rsubmit, you programmatically download the file.

/* establish connection (login form pops up) */
%let wrds wrds.wharton.upenn.edu 4016;options comamid TCP remote=WRDS;
signon username=_prompt_;
/* remote submit */
rsubmit;
/* assign library to correct directory */
libname myLib "/wrds/crsp/sasdata/q_ccm";
/* download to your machine */
proc download data myLib.COMPHIST out=work.COMPHIST;run;
endrsubmit

best regards,

Joost

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile
 
 
Posted: 05 November 2014 09:35 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  8
Joined  2014-08-20

Thank you very much!

The basic problem is that I do not have access to the required SAS. Is it also possible to access this file with R or Stata? If yes, does WRDS provide any sample programs for R/Stata/SSH Unix code (I was unable to access the folder structure in SSH). I was unable to find anything useful on the website.
I am really sorry for the basic questions but I was just given the log in data and am not an expert in coding and databases. As my colleagues do not use WRDS they cannot help me.

Profile
 
 
Posted: 05 November 2014 09:41 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

no problem!

Your institution may have only access to the yearly-updated CRSP—did you try that? If you have a valid WRDS account you should be able to ‘explore’ the directory structure with SSH and download the files you have access to. You can check with ‘myWrds’ (menu option), and select ‘products’ to see what you have access to.

To convert datasets, you can use Stata that comes with ‘Stat Transfer’. It can convert to common formats (Excel, SAS, Stata, etc).

best regards,

Joost

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile
 
 
Posted: 05 November 2014 10:03 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  8
Joined  2014-08-20

Well, I installed and setup everything in SSH as described in WRDS. When I log in in SSH then the File Transfer window disappears and I get a new window with “*** Welcome to Wharton Research Data Services (WRDS) ***” where I can type commands (links/paths do not work). If I now open the File Transfer I cannot see any folders in the remote section. So I guess there is something wrong with my configuration so that I cannot get the remote folders into my file transfer system. I tryed to teach myself how to do it via youtube but it does not work like in their example :-(

(I have a PhD account & monthly updates of current & historical data in Compustat North America but only an annual update for the CRSP/Compustat Merged database)

Profile
 
 
Posted: 05 November 2014 10:10 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

ok, it sounds that you can log in (otherwise the ‘welcome’ doesn’t appear).

do you get a terminal that says wrds(~)% at the beginning of the line?

if so, type: pwd
that will output the current directory (will be /home/institution/yourlogin)

type: ls
will display the files/directories of current directory

you should be able to navigate to that directory with SSH file browser (copy/paste the directory into the top-right input box) and you should see the same files.

if that works, navigate to /wrds in SSH file browser (hit enter after entering /wrds in top-right textbox).

does that work?

best,

Joost

 

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile
 
 
Posted: 05 November 2014 10:34 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  8
Joined  2014-08-20

Thank you very much! I noticed that it was an internal problem with our local network.

Profile
 
 
Posted: 05 November 2014 12:59 PM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

ok - glad you figured it out! smile

best regards,

Joost

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile