NEW YORK—A troubled mortgage business, a fall-off in Wall Street trading profits and a bonus tax in the United Kingdom converged to drag on Bank of America Corp.'s second-quarter results.The Charlotte-based bank, the nation's largest lender by assets, turned in profits of $3.1 billion, roughly flat over last quarter, but disappointed investors with its lackluster performance across nearly all business lines. The bank's mammoth books of loans, which has haunted its performance throughout the financial crisis, improved modestly in condition but not enough to offset a 75% quarter-over-quarter decline in investment-banking trading profits.In a statement, the bank described a "widesread market slowdown in sales and trading businesses," and said investors were less aggressive in making investments due to "greater economic uncertainty."The bank's total trading profits plunged to $1.2 billion from last quarter's $5 billion. The investment-banking results include the Wall Street operations of Merrill Lynch, which Bank of America acquired during the financial crisis under substantial controversy.The bank's results are further evidence of the U.S. economy's struggles to shake off its recession. Total outstanding loans fell across the bank's major lending businesses, including credit cards, mortgages and commerical loans.Bank of America's shares were recently down 4.2% to $14.74 in premarket trading.The bank also faced some hefty lump-sum costs from both its mortgage business and its banking activities in the U.K.Bank of America's mortgage bank, which includes the operations of Countrwide Financial Corp., turned out less red ink than last quarter, but still turned in losses of $1.5 billion. The bank said it spent $802 million to repurchase faulty mortgages it had previously written and sold—part of a broader "war" the bank has said its fighting with purchasers of mortgages, like government-controlled agencies Fannie Mae and Freddie Mac.A foreign government, facing a backlash against bankers, also took a bite out of Bank of America's results. The bank said the U.K.'s bonus tax contributed to its investment bank's $870 million in extra expenses as compared to last year's second quarter.Lurking in the bank's results are some good signs about the health of borrowers, both consumers and businesses. Chief Executive Brian Moynihan said the bank's "credit quality improved even faster than expected."The bank's commercial borrowers, like larger businesses, appear to be the healthiest. Its levels of nonperforming loans, or loans at risk of becoming uncollectable, fell among its traditional commercial loans as well as its commercial real estate laons--a good sign for the nation's regional banks, which specialize in those lending businesses.Bank of America's credit card business earned $806 million, down from the first quarter's $947 million as the bank set aside $3.8 billion for losses.Total credit-loss provisions fell to $8.11 billion from $13.38 billion a year earlier and $9.81 billion in the prior quarter, while the net charge-off rate was 3.98%, compared with 3.64% and 4.44%, respectively.The home loans and insurance segment saw its loss widen significantly amid a 37% drop in revenue, in part from a slowdown in mortgage originations, the bank said.