OPEN-SOURCE SCRIPT

SPX Excess CAPE Yield

Updated
Here we are looking at the Excess CAPE yield for the SPX500 over the last 100+ years

"A higher CAPE meant a lower subsequent 10-year return, and vice versa. The R-squared was a phenomenally high 0.9 — the CAPE on its own was enough to explain 90% of stocks’ subsequent performance over a decade. The standard deviation was 1.37% — in other words, two-thirds of the time the prediction was within 1.37 percentage points of the eventual outcome: this over a quarter-century that included an equity bubble, a credit bubble, two epic bear markets, and a decade-long bull market."

assets.bwbx.io/images/users/iqjWHBFdfxIU/ivpGY5w0lTvg/v1/-1x-1.png

In December of 2020 Dr. Robert Shiller the Yale Nobel Laurate suggested that an improvement on CAPE could be made by taking its inverse (the CAPE earnings yield) and subtracting the us10 year treasury yield.

"His model plainly suggests that stocks will do badly over the next 10 years, and that bonds will do even worse. This was the way Shiller put it in a research piece for Barclays Plc in October, (which can be found on SSRN Below):

In summary, investors expect a certain return in equities as compensation for investing in a riskier asset class, and as interest rates have declined, the relative expected return for equities has increased dramatically. We believe this may quantitatively help to explain investors current preference for equities over bonds, and as such the quick recoveries we are observing (with the exception of the UK), whilst still in the midst of a pandemic. In the US in particular, we are once again observing stretched valuations and high CAPE ratios compared to history."

Sources:
papers.ssrn.com/sol3/papers.cfm?abstract_id=3714737
bloomberg.com/opinion/articles/2020-12-11/investors-risk-being-shipwrecked-on-shiller-s-cape

The standard trading view disclaimer applies to this post -- please consult your own investment advisor before making investment decisions. This post is for observation only and has no warranty etc. tradingview.com/disclaimer/

Best,

JM
Release Notes
Someone brought to my attention that the treasury rate Shiller uses in his calculation of Excess Cape Yield is inflation adjusted. As such I've updated the script to use DFII10 instead of DGS10, as DFII10 is inflation adjusted or 'real' 10 year bond yield.

Best,

JM
adjustedCAPEexcessPEPrice/Earnings Ratio (P/E Ratio)shilleryield

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer