Long a Yahoo (YHOO) hater, Goldman Sachs (GS) reinitiated coverage of the shrunken Internet company on Thursday with a “buy” rating. 

The bullish call from Goldman sent Yahoo’s shares rallying almost 2%, leaving them nearly back to even on the year.

Declaring that Yahoo’s “parts are worth more than the sum,” the investment bank projected a potential return for shareholders of 41%, translating to a 12-month price target of $22.00.

“We believe the value of Yahoo’s balance sheet assets and the core business are worth more than the current stock price and that capital allocation actions over the coming months will serve as the catalyst to drive that revaluation,” Goldman analyst Heath Terry wrote in a note to clients.

Acknowledging Goldman has “long been more negative on Yahoo’s prospects,” Terry notes that the uncertainty surrounding the value of the Alibaba stake has been reduced, the company recently hired new CEO Marissa Mayer and the Yahoo Japan stake has jumped 30% since May 21.

Terry said that even though Yahoo’s user engagement continues to decline and it lacks a mobile strategy, the company still has hundreds of millions of users, valuable web properties and the resources to fuel a potential rebound “over time.”

Shares of Sunnyvale, Calif.-based Yahoo rose 1.73% to $15.88 on Thursday, trimming their 2012 decline to 1.58%.

Yahoo's shares have never recovered from the bursting of the tech bubble when they topped out at around $108.

Follow Matt Egan on Twitter @MattMEgan5