With the not far from the firm's 2018 year-end target, Goldman Sachs says there is still an investment strategy that can outperform.

The firm recommended companies with strong prospects for growth at reasonable valuations.

"Secular growth stocks [or] companies with the fastest expected growth offer value relative to history," David Kostin, Goldman's chief U.S. equity strategist, wrote in a report Thursday to clients entitled "Where to Invest Now."

Kostin reiterated his year-end price target of 2,850 for the S&P 500, representing just 3.7 percent upside from Thursday's close.

The strategist screened for companies that grew their sales by 10 percent or more each of the last three years and have strong potential for future growth. He then excluded stocks with high valuation multiples in terms of enterprise value to revenue ratios.

Here are six buy-rated names in the Goldman Sachs "secular growth" stock basket recommended by Kostin.

— CNBC's Michael Bloom contributed to this story.