Shiller Stock Market Data
Get Robert Shiller’s monthly US stock market data from 1871: the S&P Composite price, dividends, earnings, interest rates and the CAPE ratio, nominal and real.
It is the data behind “Irrational Exuberance” and the CAPE ratio, with the trailing price-earnings ratio (P/E) over the earnings of the last twelve months and the cyclically adjusted price-earnings ratio (CAPE) over the average of ten years of real earnings. With more than 150 years of history it is the standard source for long-run equity returns, valuations and their relation to subsequent returns.
Prices are monthly averages of daily closes; dividends and earnings are trailing twelve-month totals, with the latest months not yet published. The long interest rate is a decimal fraction (0.0475 for 4.75%).
The CAPE is mostly used as a long-run valuation gauge: across the history of the data, higher starting CAPE ratios have gone with lower average returns over the following ten years, while saying little about returns over the next year, so it is not a timing tool. Comparisons with the distant past are imperfect, as accounting rules, payout policy (buybacks instead of dividends) and the composition of the index have changed. The Total Return CAPE corrects for the shift in payout policy.
Shiller, R. J. (2015). Irrational Exuberance (3rd ed.). Princeton University Press.
See definition: shillerdata.com
Also known as: Shiller data, CAPE, Shiller PE, long-run stock returns.
Example · 2026
Install the Finance Toolkit with pip install financetoolkit -U, then call get_shiller_stock_market_data:
from financetoolkit import Economics
economics = Economics(start_date='2026-01-01', end_date='2026-09-30')
economics.get_shiller_stock_market_data(show_columns=['Price', 'Earnings', 'P/E', 'CAPE'])
Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:
What were the price, earnings, P/E and CAPE of the S&P Composite in Shiller's data in each month from January to September 2026?
Which returns:
| Item | Price | Earnings | P/E | CAPE |
|---|---|---|---|---|
| 2026-01 | 6,929.12 | 237.839 | 29.1336 | 39.6591 |
| 2026-02 | 6,893.81 | 239.865 | 28.7403 | 39.0501 |
| 2026-03 | 6,654.42 | 241.891 | 27.5100 | 37.0914 |
| 2026-04 | 6,957.01 | 248.790 | 27.9633 | 38.2345 |
| 2026-05 | 7,412.55 | 255.690 | 28.9904 | 40.2460 |
| 2026-06 | 7,450.03 | 262.589 | 28.3715 | 40.3455 |
| 2026-07 | 7,481.34 | 273.565 | 27.3475 | 40.2609 |
| 2026-08 | 7,711.32 | 284.542 | 27.1008 | 41.0871 |
| 2026-09 | 7,669.41 | 295.518 | 25.9524 | 40.2683 |
9 rows
Parameters
get_shiller_stock_market_data accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Economics class. | 2 |
growth | bool | Whether to return the growth data or the actual data. Defaults to False. | True |
lag | int | The number of periods to lag the growth data by. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |