Warren Buffett told CNBC in May that interest rates were too low to make them a good investment as compared with stocks.

That method of comparing the 10-year Treasury yield to the earnings yield of the S&P 500 is typically called the “Fed model.” One of the problems with that valuation method is that it’s flawed, according to investment bank Goldman Sachs.

"With interest rates near multi-century lows, the so-called 'Fed model,' which compares earnings yields to bond yields, retains a powerful grip on the 'valuation narrative' in the equity market," strategist Charles Himmelberg wrote in a June 28 research note cited by CNBC. "But yield comparisons across equities and bonds are a flawed metric."

After adjusting for those two factors, Goldman found the historical yield gap between stocks and the 10-year Treasury fell from the 74th percentile to the 7th percentile.

Goldman didn’t mention Buffett by name in its report, but CNBC said he would likely disagree with the bank’s conclusion.

"The most important item over time, and valuation, is obviously interest rates … The bogey is always what government bonds yield," Buffett said in the interview, according to a transcript. "I would say that anybody that prefers bonds to stocks is making a big mistake … Stocks will bounce around a lot more and they can go down 50 percent, but a 30-year bond can go down 50 percent too. At these rates, bonds are a terrible choice against stocks."

Warren Buffett told CNBC in May that interest rates were too low to make them a good investment as compared with stocks. That method of comparing the 10-year Treasury yield to the earnings yield of the S&P 500 is typically called the "Fed model."