Goldman Sachs (GS) revealed a much lighter-than-expected 12% dip in second-quarter earnings on Tuesday, sending shares of Wall Street’s largest investment bank ticking higher.

The high-profile earnings report comes during a time of turmoil for big U.S. banks and as Goldman simultaneously unveils plans to create a private bank and unload a hedge fund administrator to State Street (STT).

New York-based Goldman said it earned $962 million last quarter, down from $1.09 billion a year earlier. On a per-share basis, it earned $1.78 a share, compared with $1.85 in the second quarter of 2011. That easily trumped the Street’s view of just $1.16.

Revenue slumped by 9% to $6.63 billion, but that too surpassed consensus calls from analysts for a deeper decline to $6.28 billion.

“During the second quarter, market conditions deteriorated and activity levels for both corporate and investing clients were lower given continued instability in Europe and concerns about global growth,” CEO Lloyd Blankfein said in a statement. “Still, we remain focused on meeting our clients’ needs, while prudently managing our capital, liquidity and risk.”

Not surprisingly, Goldman was hit by a 17% year-over-year drop in investment-banking revenue to $1.2 billion, though that marked a 4% sequential rise. Financial advisory revenue tumbled 26% to $469 million as M&A activity dried up.

Goldman disclosed a 9% dip in underwriting revenue to $734 million amid a quiet period for IPOs.

Meanwhile, institutional client services revenue rose 11% annually to $3.89 billion. Revenue in fixed income, currency and commodities leaped 37% to $2.19 billion thanks to mortgage and commodities strength. Equities revenue dipped 12% to $1.7 billion.

Goldman said its compensation and benefits expenses fell by 9% year-over-year to $2.92 billion amid the weaker earnings.

Wall Street breathed a sigh of relief after Goldman’s earnings beat, bidding the company’s shares 1.87% higher to $99.51 ahead of Tuesday’s open. The rally puts the shares on pace to extend their 2012 gain of 8% but that won’t make much of a dent in their 12-month decline of 24%.

Earlier on Tuesday Goldman announced plans to sell Goldman Sachs Administration Services, its hedge fund administrator, to State Street for $550 million. State Street said it expects the division to boost its bottom line in the first full year on a cash basis.

The acquisition is seen closing early in the fourth quarter and making State Street the leading hedge fund administrator globally.

Goldman said it plans to continue to “serve the hedge fund community” through its prime brokerage, which isn’t included in the State Street deal.

In another sign of big banks’ strategic evolution, Goldman is building a private bank that will lend money to wealthy individuals and businesses, The Wall Street Journal reported.

By doing so, Goldman will join other big banks like J.P. Morgan Chase (JPM) and Citigroup (C) that already own private banks. Goldman aims to lend $100 billion, up from just $12 billion at the end of March, the Journal reported.

Follow Matt Egan on Twitter @MattMEgan5