A more accommodative Federal Reserve and the prospects for stable economic growth ahead have promoted Goldman Sachs to close a popular trade that it has backed for the past two years.

Companies with low levels of debt compared with capital have been major outperformers since late 2016 just as the Fed was getting its rate-hiking cycle into high gear. As a group, they outperformed weak balance sheets by 25 percent points during the time, Goldman told clients in a note over the weekend.

But with the central bank nearing the end of its policy tightening, Goldman thinks it's time for investors to change strategy and shift to weak balance sheets vs. strong.

"We have consistently advocated buying strong balance sheet stocks for the past two years, but the risk-reward has recently become less favorable," wrote David Kostin, Goldman's chief U.S. equity strategist. "The Fed's dovish posture, the magnitude and duration of recent strong balance sheet outperformance, and relative valuations portend lower near-term prospective returns."

After hiking its benchmark interest rate four times in 2018 and nine times since it began normalizing policy in late-2015, the Fed now appears to be on hold at least through the early part of the year. Markets recoiled in the fourth quarter of 2018 after Fed Chairman Jerome Powell had indicated the Fed was a "long way" from a neutral rate. However, the Fed's posture has changed recently amid concerns that growth could be slowing.