July 12 (Reuters) - JPMorgan Chase & Co, the largest U.S. bank, posted a 31 percent increase in second-quarter earnings on Friday after underwriting income jumped and bond trading revenue rose.

JPMorgan, the first of the major U.S. banks to report results for the quarter, managed to book more profit from trading corporate bonds even as debt prices broadly fell. The bank’s comments made some investors hopeful that rivals with big trading arms will also post strong second-quarter results.

Shares of Goldman Sachs Group Inc, Morgan Stanley and Bank of America Corp were up more than 1 percent as of late Friday afternoon.

But JPMorgan also acknowledged that market conditions have grown difficult, and that it might need to accelerate cost-cutting. Since mid-May, U.S. bond markets have suffered their worst two-month selloff in a decade, as the Federal Reserve has said it is planning to taper its massive bond purchases, known as quantitative easing.

The bond market weakness puts Chief Executive Jamie Dimon in a tough spot. Mortgage rates are rising, which could slash mortgage lending volume by 30 to 40 percent, said Chief Financial Officer Marianne Lake on a call with investors. But U.S. economic growth is still subdued, meaning demand for most other loans is hardly surging.

“It’s a difficult environment,” said Gary Townsend, co-founder of hedge fund Hill-Townsend Capital, which invests in financial stocks. “The bank is not doing as well as it can in a better interest-rate environment.”

The bank’s results beat analysts’ average forecast. Its shares were down 0.5 percent at $54.88 on Friday afternoon. The stock had jumped 25 percent this year as of Thursday’s close, helped by growing confidence that the U.S. economy is on the road to recovery.

However, the stock has fluctuated wildly in recent weeks because of concern that higher bond yields would cut in to the value of bank assets and weigh on capital levels, even if in the longer-term higher yields can lift interest income.

BY THE NUMBERS

Overall, net income rose to $6.50 billion, or $1.60 a share, in the latest quarter, from $4.96 billion, or $1.21, a year earlier.

Analysts on average had expected earnings of $1.44 a share, according to Thomson Reuters I/B/E/S.

Twenty-four cents of the earnings per share came from dipping into funds the company had previously set aside to cover loan losses. More than half of that reserve release was from a real estate loan portfolio that has benefited from rising home prices, and the rest was from loans on credit cards.

Higher interest rates reduced the value of investment securities at the bank, by one measure offsetting four-fifths of the additional capital it generated during the quarter. JPMorgan improved some of its capital ratios by reducing its risk-weighted assets, according to a presentation for an investor teleconference.

Revenue from fixed-income and equities trading rose 18 percent. Trading revenue in last year’s second quarter was hurt by the European debt crisis.

Investment banking was a second strong suit for JPMorgan. Revenue climbed 17 percent to $3.1 billion, driven by higher fees from underwriting debt and equity issues. Fees from advising companies on mergers and acquisitions fell by 15 percent to $304 million.

For the bank as a whole, revenue receded by 3 percent to $12 billion. The drop reflected a 7 percent slide in noninterest revenue that was hurt by lower mortgage fees and related income. Net interest income fell 1 percent, reflecting lower deposit margins and declining loan balances.

HOUSING MARKET TRANSITION

JPMorgan’s mortgage business is in flux now. U.S. mortgage rates have risen, with the main 30-year rate having risen more than three-quarters of a percentage point over the quarter to 4.58 percent.

That cut in to the bank’s pretax income from making mortgage loans, which fell 37 percent to $582 million, including loans the bank had to buy back. The bank did make more loans - they rose 12 percent to $49 billion - but rising rates cut in to the profitability of the loans.

The bank could be forced to cut costs in the business, CFO Lake said. Because it is unclear when volumes will drop, and it takes time to cut costs, drops in lending volume could challenge profitability, Lake added.

JPMorgan is the second-largest U.S. mortgage lender after Wells Fargo & Co, with an 11 percent market share as of the first quarter, according to industry newsletter Inside Mortgage Finance.

INCREASING CONFIDENCE

During the second quarter, JPMorgan put further distance between itself on the so-called London Whale debacle of a year earlier, when bad bets on the credit market ultimately cost the bank more than $6 billion.

In the year-earlier period, the unit that held the trades booked losses of $1.76 billion. Those trades have since been switched over to JPMorgan’s investment bank.

The second-quarter results are the first the bank has released since Dimon overwhelmingly won a shareholder referendum in May on whether he should hold both the chairman and the chief executive posts.

JPMorgan’s quarterly report, along with one the same day from Wells Fargo, the fourth-largest bank, marks the start of an intense 1-1/2 weeks of results from major financial institutions.

Citigroup Inc, the third-biggest U.S. bank, is to report on Monday, followed by Bank of America, Goldman Sachs and Morgan Stanley. (Additional reporting by Tanya Agrawal in Bangalore and Lauren Tara LaCapra in New York; writing by Frank McGurty; editing by Dan Wilchins, Ted Kerr, Lisa Von Ahn and Matthew Lewis)