Goldman Sachs Group Inc posted higher-than-expected first-quarter profit as it took more trading risk and said it planned to raise $5 billion of common shares to help pay back government funds.

The bank also said it lost $1 billion in December 2008, mainly due to trading and investment losses.

The New York-based bank has managed to sidestep most of the worst of the financial crisis, having posted just one quarterly loss since the middle of 2007, even as competitors posted four or more quarters of losses.

For the quarter ended March 27, Goldman reported net income for common shareholders of $1.66 billion, or $3.39 a share, far exceeding analysts' average forecast of $1.49 a share, according to Reuters Estimates.

Goldman's income came in part because of strong client trading activity in fixed income, currencies and commodities, where the company posted $6.56 billion of revenue.

To some analysts, the results are a clear positive.

It's another sign that the financial sector has gone through the worst, said Keith Wirtz, president and chief investment officer at Fifth Third Asset Management.

The results do not compare directly with Goldman's fiscal quarter last year, which ended on February 29, 2008, but in last year's quarter the bank posted net income for common shareholders of $1.47 billion, or $3.23 a share. Goldman and its rival Morgan Stanley switched this year to a fiscal quarter that matches the calendar year.

A RARE OPPORTUNITY

But the results were not all positive. The bank said its net loss for common shareholders was $1.03 billion in December, a month not included in its fiscal 2008 results and not included in the official results for the first quarter.

December was a rare opportunity for both Goldman Sachs and Morgan Stanley, said Brad Hintz, an analyst at Sanford Bernstein. A single month, without any comparisons that can be made with any other months, so none of us will ever know what goes into the month of December. It's one of those rare opportunities that CFOs dream about.

Between the December losses and the subsequent profit, Goldman's tangible book value per common share was essentially unchanged from the end of November, at $88.02, the bank said. Tangible common equity is a measure of the bank's net worth, ignoring intangible assets such as goodwill.

A measure of the bank's trading risk, average daily value-at-risk, surged to $240 million in the first quarter of 2009, compared with $157 million for the three months ended February 28, 2008. Value-at-risk represents the average possible trading loss on 95 percent of the days in the quarter.

Goldman said it planned to use the proceeds of its share offering plus additional funds to repay the $10 billion of capital it received from the U.S. government under the Troubled Asset Relief Program. The bank would pay back the funds if supervisors permit and the bank is stress tested by regulators.

The bank has been vocal about its preference to repay TARP money as soon as possible. In February, Chief Financial Officer David Viniar said the bank is looking to avoid the restrictions that come with TARP.

We would like to get out from under that, Viniar said.

Later in February, U.S. President Barack Obama signed a law that placed limits on executive compensation for TARP recipients. Goldman Sachs employees have traditionally been among the highest paid on Wall Street.

(Reporting by Dan Wilchins; Additional reporting by Elinor Comlay and Juan Lagorio; Editing by Andre Grenon)