JPMorgan Chase & Co posted better-than-expected quarterly earnings on Thursday as it wrote off fewer bad loans in the second quarter, but executives warned they were uncertain about the economic outlook for the rest of the year.

Much of the bank's gains came from putting less money aside to cover bad loans. And while loan losses improved in some areas, more borrowers stopped making payments on prime mortgages, boding poorly for Citigroup Inc and Bank of America Corp , which report earnings on Friday. Citi and Bank of America shares were down by 2.4 percent and 3 percent, respectively, in late afternoon trading.

The results by JPMorgan, the first of the major banks to report, suggested there is little for bank investors to look forward to as lackluster loan demand and regulatory uncertainty cloud the sector's outlook.

JPMorgan's trading revenue was weaker than last year but better than expected, which might be a positive sign for rivals Goldman Sachs and Morgan Stanley , which report next week.

The results are just OK -- there's a little less than meets the eye here, said Doug Kass, president of hedge fund Seabreeze Partners Management. Kass said he is trading out of JPMorgan after the results.

The bank's loan book continued to shrink, signaling it is hesitant to take new credit risk now and customers are reluctant to borrow. It also said it cannot estimate how financial reform legislation will affect its results.

Although Chief Executive Jamie Dimon said in the first quarter that the U.S. economic recovery could be solid, he sounded more measured on Thursday.

It is too early to say how much improvement we will see from here in the consumer lending businesses, Dimon said in a statement, adding that returns there are still unacceptable.

JPMorgan shares fell as much as 2.6 percent during the day but then recovered to trade 0.6 percent higher at $40.59 late in the afternoon. The KBW Banks Index <.BKX> was off 0.7 percent.

The bank's second-quarter earnings jumped 76 percent to $4.8 billion, or $1.09 a share, from $2.7 billion, or 28 cents a share, in the year-earlier period.

DROP IN TRADING REVENUE

Investment banking net income fell 6 percent to $1.38 billion as markets were roiled by the European sovereign debt crisis, the BP oil spill, and the U.S. equity flash crash.

It's been a tough environment to trade, and we're still concerned about the investment banks, said Tim Ghriskey, chief investment officer at Solaris Asset Management, which oversees about $2 billion.

Revenue from fixed income, commodities and currency trading was down 28 percent to $3.56 billion. Fixed income trading has been a key profit source for all the major banks since early 2009. At JPMorgan, trading revenue, boosted by its acquisition of troubled investment bank Bear Stearns Cos in March 2008, supported the company as consumer loan losses bit last year.

This quarter, JPMorgan wrote off fewer of those loans as uncollectible, allowing it to reduce the reserve of money set aside to cover losses by $1.5 billion. That was a key source of profit in the quarter, amounting to 36 cents a share, or 33 percent of total profit.

The bank wrote off 3.28 percent of the loans in its portfolio on an annualized basis, down from 4 percent a year earlier, adjusting for an accounting change.

Some analysts questioned whether the bank was too aggressive with its reserve reduction, given worries that swirled in the quarter about the possibility the U.S. economy could be heading for a double dip recession.

We are extremely cautious and careful on taking down reserves, Dimon said.

REGULATION

Dimon said the bank views itself as capital heavy, and JPMorgan bought back about $500 million of its shares in the first half of the year.

Many banks are eager to boost their dividends, but regulators are reluctant to allow it, making share buybacks more likely.

Dimon told analysts that uncertainty over bank capital requirements was also preventing the bank from raising its payout. International regulators are expected to finalize rules on bank capital before the end of the year.

Another uncertainty: The cost of U.S. bank reforms, Dimon said. Congress on Thursday was set to vote on the broadest overhaul of U.S. financial rules since the Great Depression, including prohibiting banks from trading for their own accounts.

As the largest U.S. derivatives dealer, JPMorgan has the most to lose from proposed curbs of over-the-counter derivatives trading. JPMorgan had $76.46 trillion in notional derivatives exposure at the end of the first quarter, according to the most recent report from the Office of the Comptroller of the Currency. That was down 2.5 pct from the fourth quarter but almost two-thirds as much as runner-up Bank of America.

JPMorgan posted a second-quarter charge of $550 million to compensate its UK bankers for a new bonus tax. In all, the five major U.S. banks with businesses in London are expected to pay $2.5 billion on this tax for 2009 earnings.

(Reporting by Elinor Comlay; additional reporting Dan Wilchins and Jennifer Ablan; editing by John Wallace and Matthew Lewis)