The markets certainly haven't always reflected it, but with low interest rates and inflation, the U.S. has been in the sweet spot for stocks for most of the past 20 years. "We are poised on top of a mountain," says Robert Arnott, head of Research Affiliates in Newport Beach, Calif.

But real rates are going down, assisted by Federal Reserve policy, and inflation is rising. According to Arnott's data, if those trends continue, stock prices could tumble anew.

Over the last 140 years, whenever real interest rates, represented here by yields on 10-year Treasury bonds relative to three-year inflation, have been in an ideal 3% to 4% range, stocks have traded at prices 21 times their "smoothed" earnings (averaged over a decade). When real rates are either negative or above 6% that P/E ratio tumbles to 11 or less.

Investors have become more accepting of low real rates in the last 30 to 60 years, but the shape of the mountain hasn't changed (see chart). That mountain explains some 40% of the variation in P/E ratios, according to Arnott.

In one chart, you see the mountain in P/E ratios reflect changes in inflation. When inflation rises, real rates often fall until the Fed decides to take action. P/E ratios top 23 whenever inflation is 2% to 3%. High inflation hurts P/E ratios more than high real interest rates do: The ratios fall to 9.4 whenever inflation is more than 6%.

If we create a three-dimensional mountain, it peaks at P/Es of 26, when real rates are between 3% and 5%, and inflation is 1% to 3%. Over half of the variation in P/E ratios over the past 140 years is explained by real interest rates and inflation combined.

The P/E ratio of the S&P 500 stood at about 13 as of early last month, whereas in Arnott's analysis, based on historical data and current real interest rates, the level should be closer to 16. Nonetheless, considering this history and current Fed policy, Arnott suggests looking into inflation hedges: TIPS, commodities, and emerging-market stocks and bonds.