Citigroup Inc made more money from trading in the third quarter and its lending profitability rose, surprising investors and lifting the bank's shares 5.5 percent.

Profit dropped after the third-largest U.S. bank wrote down the value of its retail brokerage business by $4.7 billion, but mortgage lending profit rose and results overall were better than analysts on average had expected.

A key element of the report was the profitability of the bank's loans, excluding credit losses, which rose as the bank cut its funding costs by taking in more low-cost deposits. Deposits rose 11 percent to $945 billion at the end of September from a year earlier.

JPMorgan Chase & Co and Wells Fargo & Co both posted shrinking loan profitability last week, raising concerns about how low interest rates could wallop bank profits for some time. On a conference call with investors, John Gerspach, Citigroup's chief financial officer, cautioned that the bank's lending margins may contract slightly next quarter.

The global economy is tough for the biggest banks, as demand for many types of loans is sluggish, regulation crimps profits in many investment banking businesses, and low rates weigh on lending profits.

The environment is another headwind for Chief Executive Vikram Pandit, who is trying to fix Citigroup after it required three government rescues during the financial crisis. Pandit is now retooling Citigroup to focus on commercial and investment banking, transaction processing, and retail banking for relatively wealthy customers globally.

The bank's Citi Holdings unit, which houses businesses and assets the bank sought to shed after the crisis, continues to weigh on the bank. Citi Holdings lost $3.56 billion in the latest quarter with the brokerage writedown, compared with a loss of $1.22 billion a year earlier. But the unit is also shrinking - it had $171 billion of assets in the third quarter, compared with $191 billion in the second quarter and $582 billion in the middle of 2009.

Including the brokerage unit writedown, Citigroup overall posted third-quarter net income of $468 million, or 15 cents a share compared with $3.77 billion, or $1.23 a share, a year earlier.

Adjusted earnings, excluding the writedown of $2.9 billion after taxes announced last month, and accounting gains and losses, was $3.27 billion, or $1.06 a share, beating analysts' average estimate by 10 cents, according to Thomson Reuters I/B/E/S.

The bank's net interest margin, a measure of profit on loans that excludes credit losses, rose to 2.86 percent from 2.83 percent in the same quarter last year and 2.81 percent in the second quarter.

Citigroup said profits from commercial and investment banking increased 67 percent in the third quarter on stronger revenue from fixed income and equity markets and lower expenses. Client demand for transactions drove the volume, which was a switch from a year earlier when the European debt crisis was darker and it seemed no customers wanted to go near the markets, Gerspach said.

Retail banking revenues in North America grew 35 percent, primarily reflecting higher mortgage revenues.

The higher mortgage revenues were the result of wider profit margins on mortgage loans Citigroup made and sold to investors, Gerspach said on a conference call with reporters. Mortgage originations declined 15 percent to $14.5 billion, but the bank expects mortgage refinancing to be strong into next year, executives said on a call with investors.

"We are still on a very good pace," with new mortgages, Gerspach said. "We did not staff up as quickly as perhaps we otherwise could have."

He added that the bank is less interested in market share of mortgage refinancings than controlling expenses.

Gerspach declined to agree with the description that the housing market has turned the corner as JPMorgan Chase & Co CEO Jamie Dimon said on Friday.

"I have difficulty seeing corners sometimes," Gerspach said. "In the past, we've seen some of these periodic improvements only to see them come crashing down."

Results outside the United States were generally weaker, with income from its continuing international consumer banking business down 3 percent and profits in transaction services provided to businesses and governments outside North America down by single-digit percentages. Some of the weaker numbers abroad were the result of changes in foreign exchange rates.

The results boosted the company's standing on the pending regulatory scale of safety known as Basel III Tier 1 Common Ratio. Citigroup pegged its reading on the scale at 8.6 percent, up from 7.9 percent three months earlier and higher than its goal for year-end of 8 percent.

Analyst Todd Hagerman of brokerage Sterne Agee said Citigroup now has enough capital to make a case to regulators that it should be allowed to pay 15 cents a share in quarterly dividend next year, up from its current, nominal one cent.

Pandit, however, refused to forecast to analysts whether the company would win approval from the Federal Reserve to distribute capital in the coming round of annual stress tests. Citigroup's last capital plan was rejected by regulators in March. Pandit said that, since then, Citigroup officials have been meeting with regulators and were able "to get some access to the people who actually run the models."

Citigroup shares have soared in recent months, rising 27 percent since the end of June and gaining nearly three times as much as the KBW Banks Index.

In September, Citigroup agreed to sell its 49 percent interest in the brokerage to Morgan Stanley at a price that valued the unit at $13.5 billion. At the time, it said it would take a charge to reduce its carrying value for the asset by about 40 percent.

The joint venture was created in the financial crisis in 2009 as a way for Citigroup to shrink by transferring its Smith Barney brokerage assets to Morgan Stanley.

The company's shares closed 5.5 percent, or $1.91, higher at $36.66 on Monday.

(Reporting by David Henry and Lauren Tara LaCapra in New York and Rick Rothacker in Charlotte, North Carolina.; Editing by John Wallace, Tim Dobbyn and Andre Grenon)