Rice Business Stock Market Data Portal

Developed and maintained by Kerry Back,
J. Howard Creekmore Professor of Finance
and Professor of Economics, Rice University

This data is licensed by Rice Business from Nasdaq Data Link. It covers all NYSE and Nasdaq listed common stocks beginning in 2000.

Instructions

Here are some sample prompts you could use to get started, but feel free to just ask for whatever data you want.

  • What are the industry names that I can filter on?
  • I want the history of Apple's adjusted closing price beginning in 2020.
  • I want all insider trades for Tesla for the past two years.
  • What is the current median PE ratio of mid-cap oil and gas stocks?
  • I want the history of DuPont ratios for all biotech stocks for the past five years.
  • What was Tesla's ROE for each of the past 12 quarters on a trailing 4-quarters basis?

For large downloads (for example, if you want to download an entire table, which is more than 30 million rows for some tables), this page might time out. A better way to download large amounts of data is to use the chatbot below to generate a query and then to execute the query using the Rice Business Data Python Notebook The notebook executes in Google Colab, so no setup is required. You only need to paste in your access token and your query and click the "Run" buttons.

A description of the tables in the database is at the bottom of this page. In case you would like to learn about SQL, a quick primer is also provided at the bottom of the page.

You might also be interested in learn-investments.rice-business.org

Loading...
Enter a prompt below for the chatbot. As an alternative to the chatbot, you can also create and execute your own SQL queries using the Edit and Execute buttons on the right.
SQL Assistant
SQL Assistant:
Hello! I can help you generate SQL queries for the database. Describe what data you're looking for, and I'll provide the SQL query.
SQL Query
Tables

Detailed descriptions of the database tables and the variables in each table can be found on our Table Descriptions page. Here are some general issues to be aware of:

  • To filter on a categorical variable, the exact values of the categorical variable must be determined. It can help to ask the chatbot to "list the possible values of variable x in table y".
  • The SEP table contains three types of prices. The open, high, low, close and volume variables are split adjusted. The closeunadj variable is not split adjusted. The closeadj variable is both split and dividend adjusted (like yfinance), so total returns including dividends can be computed (to a sufficient degree of precision) as percent changes in closeadj.
  • Financial statement data is available in the SF1 table either as reported or including restatements. Data from both 10Ks and 10Qs is available. As reported 10K data is selected by filtering on dimension='ARY'. As reported 10Q data is selected by filtering on dimension='ARQ'. The most recent data including restatements is selected by filtering on dimension='MRY' or dimension='MRQ'. Data is also available quarter by quarter on a trailing four quarters basis as dimension='ART' or dimension='MRT'.
  • The reportperiod variable in the SF1 table is the end of the fiscal period. The datekey variable is the date at which the statement was filed (for ARx data). There are also fiscalperiod and calendardate variables (see the Table Descriptions page).
SQL Primer
  • A basic SQL query is SELECT var1, var2, var3 FROM table_name; Capitalization of the SQL terms is optional. Likewise, variable names and table names are not case sensitive. To get all variables, use SELECT * FROM table_name;.
  • To filter the data when downloading, use SELECT var1, var2, var3 FROM table_name WHERE condition. The condition could be, for example, var1 <= value1 AND var2 = value2.
  • For filtering on string (text) variables, the capitalization of the string value must match what is in the database, and the string should be in single quotes (not double!). For example, industry = 'Biotechnology' is a valid filter for the tickers table, but industry = 'biotechnology' will return zero results. To find the values of a categorical variable in a table so you can filter on them, use SELECT DISTINCT var FROM table_name.
  • To merge tables, for example, to get the industry from tickers and the adjusted closing price from SEP, use something like SELECT s.ticker, s.industry, t.date, t.closeadj FROM tickers s JOIN SEP t ON s.ticker=t.ticker WHERE t.date >= '2025-01-01';.
  • For more information about SQL, this SQL Cheat Sheet is a good reference.
Feedback & Error Reporting

Please report any errors, chatbot failures, or other issues. If you want a response when the issue is fixed, include your email address. Your feedback helps improve the portal for everyone.