* Q1 EPS 3 cents vs 17 cents a year earlier
* Accounting charges hurt results
* Shares up 1.8 pct in early trading
By Rick Rothacker
April 19 (Reuters) - Bank of America Corp posted a better-than-expected first-quarter profit on Thursday, as the second-largest U.S. bank saw credit quality improve and capital markets activity rebound after slowing at the end of 2011.
The bank joined rivals such as JPMorgan Chase & Co and Citigroup Inc that have all benefited from signs of strength in the U.S. economy and more activity in the capital markets as fears about the European debt crisis eased.
Bank of America said its provision for credit losses declined to the lowest level since the third quarter of 2007 and sales and trading revenue, excluding an accounting charge, was the highest since the 2008 acquisition of Merrill Lynch.
"In general it shows nice improvement across the board," said Joe Terril, president of Terril & Co. "I think the thing I am most pleased with just at first glance is continued improvement in the loan portfolio."
Bank of America's shares rose 1.8 percent to $9.10 in early trading on the New York Stock Exchange.
The shares are up 60 percent this year after falling 58 percent in 2011. The bank passed the Federal Reserve's latest stress test in March, shifting investor concerns from its capital needs to its ability to increase earnings in a time of low interest rates and increased regulation.
Separately on Thursday, Morgan Stanley also reported better-than-expected results helped by strong trading revenue.
Bank of America's first-quarter net income was $653 million, or 3 cents a share, down from $2.05 billion, or 17 cents per share, a year earlier.
Revenue declined to $22.3 billion from $26.9 billion.
The bank reported charges of $4.8 billion related to changes in the value of its debt, partially offset by gains of $3.4 billion from equity investments and debt-related transactions.
Excluding debt valuation adjustments, it earned 31 cents a share.
Analysts' average earnings estimate was 12 cents per share, according to Thomson Reuters I/B/E/S. Bank of America said analysts typically do not include debt valuation adjustments in their estimates.
The Charlotte, North Carolina-based bank took a loan-loss provision of $2.4 billion, compared with $3.8 billion a year ago.
In its capital markets operations, Bank of America reported sales and trading revenue of $3.8 billion, up from $1.5 billion in the fourth quarter, but down from $4.6 billion a year ago.
The bank's Tier 1 common equity ratio -- comparing its core equity capital to its risk-weighted assets -- rose to 10.78 percent from 9.68 percent in the 2011 fourth quarter as it issued shares to employees, shed assets and accumulated earnings.
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements. Learn more