Bank of America on the surface had a banner day: it beat analysts' earnings estimates in the second quarter, drew some rare praise for progress in its ongoing turnaround and saw its stock shoot up.

But revenue declines in its four core business lines left a sour taste.

Executives at the Charlotte, N.C., bank said its $5.3 billion quarterly profit, more than double that of a year earlier, gives a hint of what the company will be capable of once it fully resolves its lingering problems from the financial crisis. BofA's years-long focus on reducing core costs helped, but the main lift to earnings came from sharply reduced legal costs tied to crisis-era issues.

"We think it was a giant step forward," Chief Financial Officer Bruce Thompson said on a conference call with reporters.

Fitch analysts called it "the strongest result [Bank of America] has delivered in some time," and investors appeared to agree, sending the company's stock up 3.6% late Wednesday afternoon.

But for a quarter billed as a return to normal, B of A benefited from several abnormal, one-off gains. These included about $669 million due to bond premium amortization, $350 million from the sale of consumer loans, $200 million from releasing legal reserves and $102 million from changes to its debt valuation.

The quarter was positive overall but "not as strong as advertised" because of those one-time gains, Barclays analyst Jason Goldberg wrote.

A closer look at the numbers raises questions about whether BofA can grow core revenue while aggressively slashing costs. Like JPMorgan, which reported quarterly earnings Tuesday, BofA's increase in profit in the second quarter came more from expense cuts than the revenue side.

Overall BofA achieved the difficult task of boosting revenue while reducing costs. Noninterest expenses fell 25%, to $13.8 billion, most due to $4.3 billion less in legacy-asset costs. Revenue rose 2%, to $22.3 billion, thanks to stronger income from legacy assets, equity investments, businesses being liquidated and other assorted income streams.

However, BofA's four core business lines showed how tough it is to grow while cutting. Total revenue from consumer banking, corporate banking, wealth management and trading and sales dropped $817 million from a year earlier.

Expenses in these business lines also fell, but not as much. Noninterest expenses were down a combined $392 million from a year ago.

Thompson pointed out that year-to-year comparisons are muddied due to accounting changes and new regulations like the liquidity coverage rule and. But Chairman and Chief Executive Brian Moynihan acknowledged that there is more to be done in revenue generation and expense control.

"We are satisfied that we are starting to see the hard work of all our teammates come through, but we're not satisfied in the sense that we expect better performance on both the revenue and expense dynamic in the future," he said on a call with analysts. "We'll keep working at it."

The core-revenue slide was mostly the result of weaker trading revenue, tighter loan yields and a smaller loan portfolio than a year ago.

Sales and trading revenue fells about 3%, to $3.3 billion, due to lower fixed-income revenue. Thompson said the bank plans to keep adjusting expenses in this line of business as trading income fluctuates.

"Businesses ebb and flow, and to the extent that we're trending down there's got to be a commensurate focus on expense reductions," he told reporters Wednesday.

On loan yields, though, BofA, like other banks, can do little but wait for interest rates to rise. Its net interest margin declined 4 basis points to 2.22% from the second quarter of 2014, excluding the effect of bond amortization.

The key, Moynihan said, will be to "keep the expenses flat as revenue increases." The bank is implementing a program, billed as "Simplify and Improve," intended to improve efficiency and raise revenue but which does not have formal targets, Thompson said.

As part of its plan to shift where it invests, BofA is cutting overall headcount while adding employees who it hopes will generate revenue. Its full-time employees were down 7%, to 217,000, mostly from support-staff reductions, but Moynihan said it is hiring staffers who interact with clients.

The bank has also given loan officers the signal to boost lending and has "challenged our corporate and commercial lenders for the past several quarters to more fully utilize the credit limits to drive responsible growth," Thompson said. It is providing incentives to its bankers to produce more mortgages, as well as refining internal processes related to loan generation, Moynihan said.

This may have made a difference in the second quarter, as the bank reversed the loan-portfolio shrinkage of the past few quarters and added about 1% to its portfolio since the first quarter. But its $886 billion in loans and leases was still 3% lower than a year ago, due to runoff from consumer loan portfolios, Thompson said.

Chris Cumming is a reporter for American Banker.

Read more: