Goldman Sachs told clients the market will decline the rest of the year, but there is still an investment strategy that will outperform.

The firm said investors should buy stocks with increasing profit margins.



Strategist David Kostin's year-end price target for the is 2,300, representing 2 percent downside from Friday's close.



"Given the late stage of the economic cycle, higher wages, inflation, and interest rates suggest that margin increases this year are unlikely," he wrote in a note to clients Friday. "Lower margins will translate into further negative EPS revisions in 2017."



As declining profit margins are a key risk for the market the rest of the year, the strategist shared a list of 21 companies where the firm's research analysts predicted:

A profit margin increase of at least 50 basis points or more for each of the next two years.

More than 4 percent sales growth in both 2017 and 2018.

Here is a selection of six buy-rated Goldman Sachs recommended stocks with expanding profit margins.