There is a simple recipe for substantial stock market gains, according to Jim Paulsen, chief investment strategist at Wells Capital Management.

The key condition, Paulsen explains, is for the 's earnings growth to be above the 10-year Treasury yield. Using data reaching back to 1950, the strategist found that when this is the case, the S&P has risen an average of 11.6 percent per year. When the earnings growth rate has been below the 10-year yield, the S&P has risen just 4.7 percent.

It's not simply that the stock market is cheering low rates, either. When he only looked at rising-yield environments, Paulsen found an even starker contrast between performance when earnings growth was above the 10-year Treasury yield (average annual gain of 9.8 percent) versus when it was below (0.6 percent).

To further bolster his case, he shows that the market has a lower variability of returns when the signal is triggered, which makes being invested in those years an even sweeter proposition.

So which condition are we in now? Unfortunately, with negative earnings growth and a positive 10-year yield, the signal is a negative one for stocks.

But there is a silver lining.

"Since the 10-year Treasury yield is currently near a record low of above 1.65 percent, even extremely modest earnings growth may be sufficient to push the stock market higher as interest rates rise," Paulsen wrote in a Thursday note.

He added in an interview on CNBC's "Trading Nation" that he thinks the years of negative earnings growth are "coming to an end. The bad damage done by the collapse of oil prices is past us, and there's reason to suspect better growth in the U.S. and abroad. That's enough to take earnings growth from negative year on year to positive."

"So stock investors, take heart," he added.

Paulsen, a trained economist, isn't the first to notice the significant relationship between S&P earnings, the 10-year Treasury yield and market performance.

The so-called "Fed model" compares the earnings yield on the S&P 500 (that is, earnings divided by price) with the 10-year Treasury yield; when the former is higher (lower) than the latter, stocks are said to be undervalued (overvalued). Other popular models make further modifications to this theme.