Bank of America surprises the Street by Stephen Gandel @FortuneMagazine April 19, 2012, 11:15 AM EST E-mail Tweet Facebook Google Plus Linkedin Share icons FORTUNE — Bank of America’s BAC bottom line is springing back to life. Now it just needs its actual business to follow. The bank, the nation’s second largest by assets, said it earned $653 million in the second quarter. That was down 68% from a year ago. But after factoring out non-operating accounting adjustments, the company’s earnings more than doubled from a year ago to $5.4 billion, which was far better than analysts had been expecting. On a per share basis, the company’s adjusted earnings were $0.31. Analysts had predicted the company would earn $0.12 a share. Revenue, even after the adjustment, was down 3% from a year ago to $27.3 billion. The strong operating results seemed to justify the company’s huge rise in its stock price this year, which is up 60%. B of A has been one of the best performing stocks in the market this year. MORE: Bank of America faces hurdles in rentals Like other banks, B of A was helped by its home loan division, where sales rose 30%. The bank said it made $16 billion in mortgages and home equity loans in the quarter, driven by lower interest rates. The company said 84% of its home loans were to customers were who refinancing. Losses in the division, which is still being hit by foreclosures and defaults, were half of what they were a year ago. The company was also boosted by its Wall Street operations where bond trading was up significantly. Revenue from bond trading more than tripled in the quarter to $4.1 billion from the last three months of the year. The company cut 3,000 full time employees during the quarter, lowering expenses. Nonetheless, many of Bank of America’s other businesses were down or flat for the quarter. Revenue from its consumer and business banking operations fell $1 billion. The company’s average deposits were about the same as a year ago. The company overall lending was down from a year ago. What’s more, biggest help to B of A’s bottom came not from its own operations, but from an improving ability of its customers to pay their loans, and a rising belief that the bank is on sounder financial footing. The company charged off a third fewer loans than a year ago. What’s more, the difference between what the bank had to pay to borrow versus Treasury bond yields dropped dramatically. That drop, called a credit value adjustment, lead to the bank’s huge accounting adjustment in the quarter, causing bottom line earnings to fall. Those adjustments had added to earnings in past quarters. MORE: Goldman Sachs’ profit problems And B of A is still feeling the affects of the housing downturn. The company said it lost $400 million from servicing mortgage loans. What’s more, the company added $1.9 billion home equity loans to its tally on loans it expects won’t get paid back. Regulators have eyed these loans as a coming problem for banks. “Our strategy is paying off,” said chief executive Brian Moynihan. “With the economy steadily improving and because of the work we have done to strengthen and simplify our company, we saw improved profitability in all of our businesses this quarter compared to the fourth quarter of last year.” Bank of America’s stock initially jumped on the earnings news in pre-market trading. But shortly after the market opened, much of those gains disappeared. Recently, Bank of America’s shares stood at $9, up less than 1% since the marketed opened on Thursday.