Skip to content

Compustat – Standard and Poor's


Data description

SanPCompustatS&P Compustat provides financial information on over 28,000 North American, 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 Capital IQ Pro for data on banks, insurance companies, financial institutions and financial markets.)


Time period
  • 1950s to present
  • 1987 to present for point-in-time observations
  • Database updated weekly.


Supporting documentation

1.  Compustat User Guide
2.  Dataset Overview
3.  Dataset Details: (a) Package Description (b) Schema
4.  Methodology 
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.


How to access data
  • Compustat data is hosted on an EUI server in MS SQL (structured query language) format.

  • 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 this 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 file (as received from [email protected])
- The .do file will load in Stata
- To confirm that the connection is functioning; copy this command:
      jdbc showdbs 
- Press 'Enter'
- The list of Compustat databases will appear
- Enter the required queries in the command line, for example:
      jdbc showtables

Example - selecting variables

- To view the list of tables type the command:

 jdbc showtables


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

Amadeus (Moody's Analytics/Bureau van Dijk) 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.

Capital IQ Pro (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/LSEG) is a global financial and macroeconomic time-series database, 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. Datastream is published by Refinitiv, a subsidiary of the London Stock Exchange Group plc.

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.


Data homepage

Contact: Thomas Bourke at [email protected]


Page last updated on 13 September 2022

Go back to top of the page