According to Dominic Konstam and team, writing in a note Friday, the rally is about the declining equity risk premium, which is simply the excess return the stock market provides over a risk-free rate like bond returns.

The premium jumped after stocks plunged in the financial crisis, with investors demanding as much as 7% more from choosing stocks over bonds. It has now fallen closer to its historical norm of 2% as bond yields also fell, implying that the return investors require to be compensated for their risky investments in stocks has fallen.

The sovereign bond yields in many developed countries are at or near record lows. Yields on benchmark bonds in Germany and Japan plunged deeper into negative territory after the rush to government-debt markets sparked by the UK's decision to leave the European Union.

As nominal yields have fallen, investors have rotated into higher-yielding assets, Konstam said.

From the note:

"The current cycle stands out in that earnings have played almost no role in the SPX rally. In fact, earnings were a slight drag on equities and were only offset by an aggressive multiple expansion. More than 90 percent of the rally was attributed to a collapse in equity risk premium ... In sharp contrast, the equity gains in the 1980s and 2000s were all about earnings growth, and in 1990s earnings still accounted for more than half of the rally."

Deutsche Bank The equity risk premium is still some 2% higher than its historical average over the last 30 years — so it could fall further. This gives the S&P 500 room to rise another 200 points, Deutsche Bank estimates.

But earnings and expectations for them remain the biggest driver of stock prices. And because the second-quarter earnings season could mark the fourth straight decline in year-over-year S&P 500 earnings, that's a near-term risk to the rally, according to Deutsche Bank.