Click photo to enlarge
FILE - In this May 11, 2012 file photo, people stand in the lobby of JPMorgan Chase headquarters in New York. JPMorgan Chase & Co. reports quarterly financial results before the market opens on Friday July 12, 2013.
NEW YORK—A surge in investment banking pushed up JPMorgan's second-quarter profit even as results at its consumer business sagged.

JPMorgan earned a bonanza in fees from underwriting stock and bond offerings in the first three months of the year as financial markets thrived. The gain offset a slight decline at the bank's consumer business, which struggled with lower mortgage fees.

The bank made $6.1 billion in the second quarter after stripping out payments to preferred shareholders. That was up 32 percent from the same period a year ago, when it made $4.6 billion. Profits in the year-ago period were affected by a trading loss.

JPMorgan and other banks have benefited from the Federal Reserve's easy-money policies, which have encouraged corporations to borrow money and consumers to refinance mortgages. While rates have been going higher in recent weeks as investors anticipate the Fed's eventual exit from economic stimulus, JPMorgan's CEO Jamie Dimon said that wasn't a cause for worry.

"All things being equal, rates going up is a good thing, as long as the economy keeps growing," Dimon said in an interview on CNBC.

If anything, rising rates should boost JPMorgan's profits, said Shannon Stemm, financial services analyst for Edward Jones, a wealth adviser. As the economy strengthens, not only would demand for loans increase, the loans would also be made at higher rates.

"You don't want (rates) to go up too fast," said Stemm. "But rising rates are ultimately going to be positive for the banks."

While higher rates will benefit many parts of the banks' business, they will have a "significant impact" on mortgage refinance volumes and margins, the bank's chief financial officer, Marianne Lake, said on a conference call with analysts. Lake said the bank was still confident that it could increase its share of the overall mortgage market even as the recent refinancing boom winds down.

The bank's mortgage originations rose 12 percent to $49 billion compared to a year ago, but were down 7 percent from the previous quarter. Mortgage loan applications rose 37 percent from the prior year to $66.9 billion, driven by an increase in refinancing activity, rather than applications for new loans.

JPMorgan's profits from investment banking surged 19 percent to $2.8 billion, driven by higher fees for underwriting debt and stock sales. Earnings at the bank's consumer division fell 6 percent to $3.09 billion.

Despite the surge in overall profits, Dimon said in a statement that loan growth remained "soft." That's a sign business and consumers are still wary of taking on more debt despite the Federal Reserve's low-interest rate policies.

Overall revenue for the bank in the period grew by 14 percent to $25.2 billion. That compared with $24.9 billion forecast by analysts.

The earnings were equivalent to $1.60 per share. That exceeded the estimates of analysts polled by FactSet, who had forecast earnings of $1.44 per share.

The bank also reduced its provision for loan losses in its consumer banking division by $1.5 billion as the number of customers failing to repay their loans remained low.

JPMorgan's earnings were hit a year ago after it was forced to increase its loss estimates from a bad trade linked to complex investments known as credit derivatives. The soured bet ended up costing the bank more than $6 billion last year and drew sanctions from federal regulators. Dimon, who was forced to appear twice before congress to apologize and explain the loss, also had his pay cut by more than half to $11.5 million.

The CEO, who also holds the job of chairman at the bank, survived a vote May 21 that would have called on him to give up his dual role following the trading loss.

JPMorgan's stock fell 17 cents, or 0.3 percent, to close at $54.97 Friday. The stock is trading close to its highest in more than a decade and is up 25 percent this year.