Selecting All Listed Stocks in a CRSP Query
Summary
The document answers a data-access question: how to retrieve CRSP stock records across NYSE, AMEX, and Nasdaq without entering company identifiers one at a time or uploading a hand-built list. Its suggested workflow is to select the option that searches the entire database, then use exchange code as a query variable to restrict the output to the desired listings. The response identifies the exchange codes for NYSE, AMEX, and Nasdaq and notes that unwanted records can instead be removed from results or excluded through a conditional query.
This is a concise instruction for the WRDS query form, not an R or Python extraction method. It does not explain code, discuss CRSP identifier history, or address survivorship and sample-definition choices. Users should confirm the available fields and exchange coding in their current interface before relying on the query, since the document provides no screenshots or verification of present-day settings.
Key ideas
- The WRDS query form can search the entire CRSP database rather than requiring individual company codes.
- An exchange code can be used to select NYSE, AMEX, and Nasdaq records.
- Unwanted exchange observations can be filtered out after retrieval or excluded in the query.
- The response describes a form-based workflow and does not provide an R or Python approach.
Tags
Full text
# How to download all stocks from NYSE, AMEX and Nasdaq from CRSP without entering individual company codes? # How to download all stocks from NYSE, AMEX and Nasdaq from CRSP without entering individual company codes? I was wondering if there is an efficient way to extract data on all the stocks from the CRSP dataset? In the Query Form I only have the option to enter company codes individually or to upload a .txt file with one company code per line. Both of which is not an efficient option. Is there a way to possibly achieve this goal in R or Python? ## Answer by Kevin (score 2, accepted) https://quant.stackexchange.com/a/55840 You can easily download information about all available stocks from the query form. Simply choose the option `Search the entire database` (see below). Furthermore, you should include the exchange code as query variable. NYSE has exchange code 1, AMEX exchange code 2 and NASDAQ exchange code 3. You can delete all other observations or simply implement a conditional statement in the WRDS query form.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.