Traders work at Goldman Sachs booth on the floor of the New York Stock Exchange in New York.

Goldman Sachs made a portfolio of the most loved stocks by both hedge funds and mutual funds, and it is crushing the market and the bank's own secret portfolios.

Two of Goldman's baskets created exclusively for its clients — one tracking hedge funds' top holdings and one with large-cap mutual funds overweights — are both already beating the market this year, but the real stars are the stocks that overlap the two baskets as they have delivered years of outperformance and have a better earnings outlook than either portfolio, the bank said.

"Great minds think alike," Goldman's chief U.S. equity strategist, David Kostin, said in the note. "The median shared favorite is expected to have higher margins and faster growth in 2019 than the median S&P 500 stock."

There are 13 stocks that are favorites by both hedge funds and mutual funds, the most since the first quarter in 2017, according to Goldman. The similarity increased when both industries loaded back up on tech stocks during the fourth quarter and they both trimmed their exposure to health care, consumer staples and materials, Goldman said. The overlapping stocks include ServiceNow, Adobe, Paypal, Delta Air Lines, Google parent Alphabet and Visa.

The shared favorite stocks have outperformed the S&P 500 by 70 basis points in 2019 and by 16 percentage points since the start of 2018. They also have a track record of beating the market — the group has delivered an annualized return of 19 percent since 2013, higher than Goldman's hedge fund and mutual fund baskets and beating the 's 14 percent gain, the bank said.

The bank covers 880 hedge funds with $2.1 trillion of gross equity positions and 521 large-cap mutual funds with $2.1 trillion of equity holdings.

There has been an average of 11 stocks that are most loved by both hedge funds and mutual funds over the past five years, according to Goldman. Alphabet is the only stock that has been a favorite by both industries for 18 quarters. Stocks on average have stayed on the list of shared favorites for four consecutive quarters, Goldman said.

WATCH: Five strategies you should use to protect your portfolio