By Peter Rudegeair And Christina Rexrode 

Bank of America Corp. said Wednesday that it swung to a first-quarter profit as the second-largest U.S. bank by assets started to recover from its large legal losses of prior years.

But results missed the expectations of analysts polled by Thomson Reuters amid a trading performance that fell short of rival J.P. Morgan Chase & Co.'s, pushing Bank of America shares down about 0.5% premarket.

The Charlotte, N.C, lender reported a profit of $3.36 billion, or 27 cents a share. That compares with a loss of $276 million, or five cents a share, in the same period of 2014. Analysts had expected earnings of 29 cents a share.

Revenue fell 5.9% to $21.42 billion. Analysts had expected $21.51 billion. The decline in revenue stood in contrast to the revenue growth reported Tuesday by J.P. Morgan and Wells Fargo & Co.

Bank of America, under Chairman and Chief Executive Brian Moynihan, is trying to rebound from a down year in which profits plunged 58% on account of huge legal bills and the low-interest rate environment holding back its lending income. The loss the bank posted in the first quarter of 2014 was due to a $6 billion litigation charge for mortgage-related settlements with federal prosecutors and regulators.

The bank, which has been cutting costs methodically since the financial crisis, now sees its fortunes tied to the timing of interest rates rising, an environment that will likely allow the bank to charge more on loans.

The industry is "still not in a rate environment that we'd like it to be, " the bank's chief financial officer, Bruce Thompson, said on a call with reporters Wednesday. He said the economy is in a "continual grind toward the improvement side."

The bank has said previously that it could boost its annual net interest income by around $3.7 billion if short- and long-term interest rates each rose 1 percentage point.

The bank's trading divisions didn't perform as well as J.P. Morgan, but Mr. Thompson said it was too early to tell how the bank did overall in trading compared with a broader set of peers.

Trading revenue, excluding an accounting adjustment, decreased 5.1% to $3.9 billion from $4.11 billion in the first quarter of 2014. The bank said record foreign-exchange trading results weren't enough to offset weakness in trading credit and mortgage securities.

Stock trading revenue was roughly flat at $1.15 billion. At J.P. Morgan, overall trading was up 9% and stock trading was up 22% over the same timeframe.

One bright spot came from the bank's expense control and diminishing litigation headaches. Costs decreased 29% to $15.7 billion from $22.24 billion a year earlier. Costs in BofA's legacy assets and servicing division, which handles delinquent mortgages, fell to $1 billion from $1.6 billion in the same period of 2014 as the number of loans that were over 60 days behind on their payments fell to 153,000 from 277,000.

Legal expenses declined to $370 million from $6 billion in the first quarter of 2014. Last year's first-quarter litigation charges went partially towards a March 2014 settlement with federal housing regulators and partially towards a future $16.65 billion settlement, which was announced in August 2014, with federal and state prosecutors. After spending more than $70 billion in fines and settlements since the financial crisis, BofA executives have said the bulk of its crisis-era legal woes have passed.

The bank has also cut branches and staff. Bank of America had 219,658 full-time employees on its payroll at the end of the first quarter, a 1.8% decline from the end of 2014 and a 7.9% decline from the first quarter of 2014. Mr. Moynihan said Wednesday that employee headcount is approaching levels not seen since early 2008, before the acquisitions of Countrywide and Merrill Lynch swelled the bank's ranks by 100,000 more employees.

BofA has struggled to grow its overall loan portfolio, however, as it worked through its legacy consumer real estate loans.

Total loans fell to $877.96 billion from $881.39 billion in the fourth quarter and $916.22 billion in the first quarter of 2014.

Bank of America extended $13.7 billion in mortgages in the quarter, helped by an increase in home refinancings spurred on by falling mortgage rates. That's an increase of 55% from the $8.85 billion the bank extended in the first quarter a year ago. On the call, Mr. Thompson called trends in the mortgage business "encouraging."

Bank of America's investment-banking fees fell 3.6% in the first three months of 2015 even as it posted the highest revenue from advising on deals since its 2009 acquisition of Merrill Lynch. That's because debt-underwriting fees, which make up roughly half of BofA's business, declined by nearly 24%, which Mr. Thompson attributed to regulatory restrictions on leveraged loans.

Write to Peter Rudegeair at peter.rudegeair@wsj.com

Access Investor Kit for Bank of America Corp.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US0605051046

Access Investor Kit for JPMorgan Chase & Co.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US46625H1005

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

JP Morgan Chase (NYSE:JPM)
Historical Stock Chart
From Mar 2024 to Apr 2024 Click Here for more JP Morgan Chase Charts.
JP Morgan Chase (NYSE:JPM)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more JP Morgan Chase Charts.