JPMorgan Chase & Co said record investment banking and trading results drove quarterly profit 36 percent higher, topping Wall Street forecasts, but reported a surge in consumer credit losses that foreshadows deeper problems on Main Street.

Though the second-largest U.S. bank is among the nation's healthiest major lenders, it more than doubled the amount set aside for bad loans, to $9.7 billion. JPMorgan expects its credit card business to lose money this year and next, and sees higher commercial real estate losses for several quarters.

We're still obviously in a pretty big recession, Chief Executive Jamie Dimon said on a conference call.

He said rising unemployment will put upward pressure on credit losses.

Results nonetheless benefited from improving credit markets and regulators' efforts to stimulate the economy by keeping borrowing costs low, bolstering mortgage and other lending.

The bank has done reasonably well on the trading side and less well on the home and private lending side, said Peter Dixon, an economist at Commerzbank in London.

JPMorgan shares closed down 13 cents at $36.13 on the New York Stock Exchange. They have risen 15 percent this year, while the KBW Bank Index <.BKX> is down 14 percent.

HAVES AND HAVE-NOTS

Second-quarter profit rose to $2.72 billion from $2 billion a year earlier. Profit per share fell to 28 cents from 53 cents as the number of shares outstanding increased.

The New York-based bank said net revenue jumped 41 percent to $27.71 billion and according to general accounting principles was $25.62 billion.

Results included per-share charges of 10 cents to bolster a federal deposit insurance program and 27 cents tied to last month's repayment of $25 billion taken from the government's Troubled Asset Relief Program. JPMorgan has said it will let the Treasury Department auction the attached stock warrants.

Analysts on average expected profit of 4 cents per share on revenue of $25.91 billion, according to Reuters Estimates.

Core earnings power appears strong, wrote Standard & Poor's equity analyst Stuart Plesser.

Trading profits helped Goldman Sachs Group Inc post much better-than-expected quarterly earnings on Tuesday. Bank of America Corp and Citigroup Inc are expected on Friday to post relatively weaker operating performance.

Dimon skirted the worst of the credit crisis by avoiding big losses on complex debt and mortgages.

The bank's balance sheet shrank for a third straight quarter, shedding $52.5 billion of assets to $2.03 trillion. Among the six largest U.S. banks, JPMorgan is the only one to make money in every quarter since the recession began in 2007.

It looks like good, strong numbers, said Michael Hecht, a JMP Securities analyst. We are in an increasing world of haves and have-nots and we know where JPMorgan and Goldman fall.

JPMorgan added $1.8 billion to credit reserves, ending with $29.82 billion, while nonperforming assets rose $2.86 billion from the end of March to $17.52 billion.

On a conference call with reporters, Dimon said the bank will likely not raise its dividend before early next year, following an 87 percent cut in February. He said he would rather resume stock buybacks before raising the payout.

Still, Dimon said loan loss reserves are probably getting pretty close to their peaks. He said the bank sees a little bit of a leveling off of delinquencies and a little bit of resilience in the battered California housing market.

JPMorgan said losses tied to the Washington Mutual Inc banking units it bought last September are in line with its forecasts. It said it has no material exposure to CIT Group Inc , the troubled lender to small businesses.

Dimon echoed rivals in opposing an Obama administration plan for a new consumer finance protection agency.

The more agencies, the more politics and bureaucracy, he said.

COMPENSATION PRESSURES RISE

Profit in JPMorgan's investment bank more than tripled to $1.47 billion. Revenue rose by one-third to $7.3 billion, including a record $2.24 billion of investment banking fees and a record $4.93 billion from fixed-income trading.

Though investment bankers were paid 15 percent less, Dimon acknowledged more pressure from competitors to attract talent. Exiting TARP freed JPMorgan from some pay limits. Pay at Goldman, which also exited TARP, may set a record this year.

It's just going back to where it was, Dimon told reporters, discussing compensation. We will be facing the real compensation issues when we get to the end of the year.

Credit card operations posted a $672 million loss. JPMorgan boosted its projected loss rate on cards to 10 percent for this quarter and sees a 24 percent loss rate from Washington Mutual by year-end, the high end of a range it forecast in April.

Consumer banking's profit nearly vanished, falling to $15 million from $503 million, hurt by housing losses. Mortgage volume rose 9 percent from the first quarter to $41.1 billion.

JPMorgan now expects near-term quarterly losses of about $600 million from prime-quality mortgages, up from $500 million it forecast in April, and $500 million from subprime mortgages, up from a previous forecast of $375 million to $475 million.

To boost the lending margin, which fell to 2.96 percent from the first quarter's 3.18 percent, Chief Financial Officer Mike Cavanagh said JPMorgan will let high-yielding certificates of deposit sold by Washington Mutual roll off its books.

We're not going to be chasing those hot money deposits, he said.

(Reporting by Jonathan Stempel; additional reporting by Steve Eder; editing by John Wallace and Andre Grenon)