Retrieves Robert Shiller’s monthly US stock market data from 1871, the data behind “Irrational Exuberance” and the CAPE ratio: the S&P Composite price, dividends and earnings, the consumer price index, the long-term interest rate, the same in real (inflation-adjusted) terms, and the cyclically adjusted price-earnings ratio (CAPE), the price 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.

No API key is needed.

See definition: https://shillerdata.com/

Also known as: Shiller data, CAPE, Shiller PE, long-run stock returns.

Shiller Stock Market Data in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_shiller_stock_market_data as shown below.

from financetoolkit import Economics

economics = Economics(start_date='2026-01-01', end_date='2026-09-30')

economics.get_shiller_stock_market_data()[['Price', 'Dividend', 'Earnings', 'CAPE']]

Or, after setting up the Finance Toolkit MCP, ask:

What were the price, dividend, earnings and CAPE of the S&P Composite in Shiller's data in each month from January to October 2026?

Which returns:

  Price Dividend Earnings CAPE
2026-01 6929.12 79.8018 247.664 39.6408
2026-02 6893.81 80.0835 254.693 39.014
2026-03 6654.42 80.3653 261.723 37.0316
2026-04 6957.01 80.8113 272.945 38.1383
2026-05 7412.55 81.2572 284.166 40.1014
2026-06 7450.03 81.7032 295.388 40.1502
2026-07 7481.34 nan nan 40.0086
2026-08 7711.32 nan nan 40.9874
2026-09 7669.41 nan nan 40.5809

Parameters

get_shiller_stock_market_data accepts the following parameters.

ParameterTypeDescriptionExample
roundingint | NoneThe number of decimals to round the results to. Defaults to None.2
growthboolWhether to return the growth data or the actual data. Defaults to False.True
lagintThe number of periods to lag the growth data by. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
Share