Cyclically adjusted price-to-earnings ratio
The cyclically adjusted price-to-earnings ratio is a valuation metric that divides an asset's price by its average inflation-adjusted earnings over the preceding ten years.
Build a Robo-Advisor with Python (From Scratch)
A stock valuation ratio that divides price by inflation-adjusted average earnings over the prior ten years.
- How it is used
- Adjusts historical S&P 500 returns for valuation changes when estimating expected returns.
- How deep it goes
- Defines CAPE and implements annual data preparation and OLS regression, without detailing broader valuation interpretation.
- Examples
- Uses VFINX returns, Robert Shiller’s CAPE spreadsheet, annual resampling, and CAPE-change regression.
- What you can do after
- Apply it via pandas, yfinance, pandas-datareader, and statsmodels to construct CAPE data and estimate return relationships.
Investing for Programmers
A cyclically adjusted price-to-earnings ratio is a stock-market valuation metric that divides a current stock or index price by average inflation-adjusted earnings over the preceding ten years.
- How it is used
- Uses long-term market valuation to inform equity allocation and risk assessment.
- How deep it goes
- Defines the ten-year real-earnings formula, gives thresholds, and explains limitations without promising precise timing.
- Examples
- Uses S&P 500 readings, a 16–18 historical average, and illustrative thresholds above 30 or below 10.
- What you can do after
- Evaluate long-term market valuation and adjust equity exposure without treating the ratio as a prediction.
Read how Investing for Programmers explains cyclically adjusted price-to-earnings ratio →
Related concepts
- price-to-earnings ratiocontrasts with · A price-to-earnings ratio compares a company’s or stock’s market price with its earnings per share.
- valuationmeasures · Valuation is an estimate of the economic or market worth of an asset, business, investment, or ownership interest.
- stockconfigures · Stock is a financial security representing an ownership interest in a company, often divided into shares that may confer economic or governance rights.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

