Compustat – Standard and Poor's
S&P Compustat provides financial information on over 28,000 U.S. and Canadian publicly-held companies from the 1950s to present. The database includes a wide range of income, balance sheet, flow of funds and supplemental data, across 340 annual and 120 quarterly items, with point-in-time snapshots from 1987 to present. Compustat is published by S&P Global Inc. EUI members also have access to S&P Global Market Intelligence.
- 1950s to present
- 1987 to present for point-in-time observations
- Database updated weekly.
1. Compustat User Guide
2. Dataset Overview
3. Dataset Details: (a) Package Description (b) Schema
5. Working with the Data: (a) Time Periods (b) Data Structure (c) Company Data Overview (d) Company Data - add criteria (e) Company Data - mergers and acquisitions (f) Retrieving Company Data (g) Company Data - retrieving specific data items (h) Company Data - formulas and calculations (i) Security Data (j) Index Data (k) Reference Data (l) Currency Data (m) Economic Indicator Data (n) Other Usage
6. Supporting Documents
7. Sample Queries.
Compustat data is hosted on an EUI server in MS SQL (structured query language).
The database is accessible via Stata 17 (2021) installed on EUI researcher desktops.
Professors and fellows can request Stata 17 desktop installation via the relevant ICT Site Office.
- Further information about the JDBC (Java DataBase Connectivity) API in this PDF guide with examples at link.
Accessing Compustat via Stata 17
- Request the Compustat .do configuration file from [email protected]
- Open Stata 17 via 'Programmes'
- Click File (upper left)
- Select 'Do...' from the dropdown menu
- Open the compustat.do file (as received from [email protected])
- The .do file will load in Stata
- To confirm that the connection is functioning; copy this command:
- Press enter
- The list of Compustat databases will appear
- Enter the required queries in the command line, for example:
Example - selecting variables
- To view the list of tables type the command:
For example; annual company fundamentals:
- co_afnd1 (variables from A to L)
- co_afnd2 ( variables from M to Z)
To display all the variables contained in a Table, use the command:
jdbc describe "co_afnd1"
To identify variables, use the online user support site (registration instructions above), and follow this path:
- Compustat User Guide
- Data Item List
- Download the Excel file 'compustat_item_list_commercial.xlsx'
Examples of variables' loading:
Load annual fundamentals' variables A-L. Use command:
jdbc load, table("co_afnd1")
Load multiple variables - eg: 'gvkey' and 'at' (to be separated by a comma) in the annual fundamentals' set:
jdbc load, exec("SELECT gvkey, at FROM co_afnd1;")
Example - Largest 100 North American firms, by total assets, in the ICT sector
Related data resources for EUI members
- Global Market Intelligence (S&P) provides data on banks, insurance companies, financial institutions and financial markets worldwide. Coverage includes ownership information, market analysis, filings, financial statements, mergers and acquisitions' data and sectoral news.
- Datastream (Refinitiv) is a global financial and macroeconomic platform providing data on equities, stock market indices, currencies, company fundamentals, fixed income securities and key economic indicators for 175 countries and 60 markets. Equity data from IPO to present is updated daily. Macroeconomic time series are monthly, quarterly and annual, with up to 60 years of coverage.
- Amadeus (Bureau van Dijk/Moody's Analytics) is a database of comparable financial and business information on Europe's largest 560,000 public and private companies by total assets. 43 countries are covered.
- Global Financial Data (GFD Inc.) provides long-range historical financial data on stocks, bonds, bills and other instruments, covering approximately 200 countries from the early modern period to the present.
Contact: Thomas Bourke at [email protected]
Page last updated on 01 July 2021