Bank of America Corp. (BAC - Get Report)  said profit doubled in the fourth quarter from a year earlier, when the second-largest U.S. bank took a big write-down related to passage of the 2017 tax law.  

Net income rose to $7.3 billion, the Charlotte-based bank said Wednesday in a press release. Earnings per share were 70 cents, above the average analyst estimate of 63 cents in a FactSet survey. 

Net revenue rose 11% to $13.1 billion, according to the bank, while noninterest expenses fell by 1.1%.

Gerard Cassidy, an analyst at the brokerage firm RBC Capital Markets, wrote in a report that Bank of America's lending margin -- the interest charged on loans minus the cost of deposits and other borrowings -- was wider than he had estimated. Also, investment-banking fees were higher than he expected, while reserves against potential loan losses were below his projections.

The results were driven by "disciplined expense management while investing in our future" along with "solid asset quality and loan and deposit growth," CEO Brian Moynihan said in the press release. 

A year ago, after President Donald Trump's tax law reduced the corporate rate to 21% from 35%, Bank of America had to write down the value of tax credits that had been stored up. That move and other tax-related charges reduced net income during the fourth quarter of 2017 by $2.9 billion.

On an adjusted basis, excluding the extra charges in the fourth quarter of 2017, pretax income in the recent quarter was up 22% from a year earlier, Bank of America said.      

And as with most U.S. corporations this year, the bank has benefited from the lower U.S. corporate tax rate.

For the full year, for example, the bank's adjusted pretax profit rose 15% to $30.2 billion, according to the press release.

Thanks to the tax cuts, the adjusted after-tax profit rose by 33% to $21.1 billion.   

The stock rose 7.2% to $28.45 at the close of trading on Wednesday.

Live Thursday: Jim Cramer Unveils His Top 10 Tips for a Bear Market

Join Jim Cramer on Thursday at 11:30 a.m. ET when he unveils his "10 Lessons for a Bear Market." Jim will release his tips during a live monthly videoconference call with his Actions Alerts PLUS club for investors. The call is normally for members only, but Jim is opening it to the public this month for the first time ever. Register now and join in!