Two major types of investors agree on these stocks, so they could be set to outperform, Goldman says

People pass by the Salesforce Tower and Salesforce.com offices in New York City, March 7, 2019.
Brendan McDermid | Reuters

When both hedge funds and mutual funds agree on a stock, the shares have a strong track record of beating the market, according to Goldman Sachs.

This year is no exception for these so-called shared favorites from Goldman.

Goldman looked at 815 hedge funds with $2.0 trillion of gross equity positions and 572 large-cap mutual funds with $2.4 trillion of assets under management. The overlapping names between hedge funds and large-cap mutual funds' top holdings have generated an annualized return of 19% since 2013, compared to a 14% gain for the S&P 500, the bank noted.

Here are the shared favorites among those two major investors as of the end of the second quarter.