The Goldman Sachs Group (GS), which has largely avoided the mortgage and credit messes that have hit other Wall Street competitors with a vengeance, said Tuesday morning that earnings fell amid tough market conditions -- but still managed to beat analyst expectations. The Wall Street firm said it earned $2.05 billion, or $4.58 per share, during its second quarter; that was off 11 percent compared to $2.29 billion, or $4.93 per share, a year earlier -- but up 38 percent from the first quarter. Revenue fell 7 percent to $9.42 billion from $10.18 billion a year earlier. Those numbers easily beat estimates by analysts polled by Thomson Financial; Reuters reported that analysts had expected earnings of $3.42 per share. The company has exceeded analysts' estimates for 12 straight quarters. Shares in the Wall Street firm gyrated wildly throughout the day, however, largely in response to investor's uneasiness over oil -- after jumping up immediately at market open, shares trended down nearly 1 percent in the early afternoon, only to reverse course by the afternoon and gain strongly to the tune of rougly 1 percent, and then again pare gains. Shares stood at $182.64, up $.55 or 0.31 percent, when this story was published. Mortgage opportunist While ineffective hedges on leveraged loans led to a $500 million hit to income, Goldman has emerged from the credit crisis thus far looking mostly like, well, gold. The firm manged to become one of the strongest on the Street by making a series of now-prescient moves in the mortgage market that have since allowed the firm to skirt the worst of the crisis. Chief Financial Officer David Viniar told reporters on a conference call that net exposure to residential mortgages total just $15 billion on the company's balance sheet, down from $19 billion one quarter earlier. $12.2 of the firm's exposure lies in prime, with $1.8 billion in subprime and the rest in Alt-A, he said. By comparison, Lehman Brothers Holdings Inc. (LEH), which reported earnings on Monday, said that it held $60.8 million in mortgages and related asset-backed securities on its balance sheet; $24.9 billion of that total lies in residential mortgages. Perhaps more interestingly, Viniar signaled that Goldman will be looking to compete with more than 400 hedge funds and institutional investors now piling into the distressed mortgage space. Saying that the firm was "prepared" to begin buying, he also said that the company doesn't yet see the sort of value that would entice it to jump in just yet. "We have seen more lately but still not a lot of big portfolios of distressed assets for sale at prices that we think are reasonable," he said. Disclosure: The author held no positions in GS or LEH when this story was originally published. HW reporters and writers follow a strict disclosure policy, the first in the mortgage trade.