Compustat – Standard and Poor's
S&P Compustat provides financial information on over 28,000 North American, publicly-held companies from the 1950s to present. The database includes detailed 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 accessible via Stata, installed on EUI desktops. Data is hosted locally in MS SQL (structured query language) format. Users should request the Compustat .do configuration file from [email protected] Full details are at 'How to access data' below. For data on banks, insurance companies, financial institutions and financial markets, EUI members should access S&P Capital IQ Pro.
- 1950s to present
- 1987 to present for point-in-time observations
- Database updated weekly.
1. Compustat User Guide 2023
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 a local EUI server in MS SQL (structured query language) format. The database is accessible via Stata 18 (2023) installed on EUI desktops.
Compustat via Stata
- Request the Compustat .do configuration file from [email protected]
- Open Stata 18 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:
- Further information about the JDBC (Java DataBase Connectivity) API is in this PDF guide with examples at this link.
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
Amadeus (BvD/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. The database provides standardised annual accounts (consolidated and unconsolidated), financial ratios, sectoral activities and ownership data. Amadeus is suitable for research on competitiveness, economic integration, applied microeconomics, business cycles, economic geography and corporate finance. [Full details]
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. EUI members can create an account by following the instructions at How to access data. The EUI provides access to the S&P Market Intelligence Financial Institutions Group (MIFIG) dataset. [Full details]
Datastream (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. [Full details]
Factiva (Dow Jones) is a digital archive of global news content covering 18,000 sources from 159 countries. The platform also hosts the Factiva Companies & Markets database, providing five years of headline economic data. (EUI members requiring longer data series should use the other databases listed in this directory.) Users of Factiva can locate, elaborate and export data on single companies, or a selection of companies, by peer group. Custom reports can be generated in the Snapshot feature - including news, key developments and financial information. [Full details]
The Global Financial Database (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. EUI members can create an account by following the instructions at How to access data. The GFD platform is called 'Finaeon.' Data series are assigned nine metadata descriptors: Series ID; Description; Start date; End date/most recent; Periodicity; Country/territory; Currency; Series type (eg. government bond yields) and GFD sector designation (eg. equity). [Full details]
Contact: Thomas Bourke at [email protected]
Page last updated on 24 August 2023