Bank of America reported better-than-expected profit and revenue for the fourth quarter on Wednesday, driven by a strong performance from its consumer-banking business and lower taxes. The results sent the bank's shares up 7.16 percent.

Here is how the bank did in the previous quarter compared to analyst expectations:

Earnings: 73 cents per share vs 63 cents expected, according to Refinitiv

Revenue: $22.7 billion versus a forecast of $22.397 billion

Bank of America's quarterly profit tripled to $7.3 billion, a record. The bank also said it bought back $26 billion in common stock.

"Operating leverage based on disciplined expense management while investing in our future, solid asset quality, and loan and deposit growth drove this quarter's results," CEO Brian Moynihan said in a statement. "Through the trillions of dollars of consumer transactions we process and from the steady confidence and activity of our small business and commercial clients, we see a healthy consumer and business climate driving a solid economy."

Profits in Bank of America's consumer banking business grew by 52 percent on a year-over-year basis to $3.3 billion. Loans grew by about 1.9 percent, while credit and debit card spending expanded by 6 percent.

The company's net interest income, a widely followed measure of profitability for banks, hit 2.48 percent in the fourth quarter. Analysts polled by StreetAccount expected 2.45 percent.

However, Bank of America's fixed-income trading business disappointed Wall Street. Fixed-income trading revenue fell 15 percent to $1.45 billion, below expected sales of $1.62 billion. That steep decline was offset by an 11 percent rise in equities trading revenue to $1.1 billion. Overall, sales and trading revenue grew by 1 percent on a year-over-year basis to $2.6 billion.

Bank of America's report follows the release of J.P. Morgan Chase's results on Tuesday. J.P. Morgan posted weaker-than-expected earnings, but the stock managed to post a slight gain.

Goldman Sachs, Wells Fargo, Citigroup also released their quarterly earnings this week, topping expectations. Morgan Stanley is slated to release its quarterly earnings on Thursday.

Shares of Bank of America have risen more than 7 percent this year, recovering most of the steep losses from last month. In December, the stock plummeted 13.24 percent amid a massive market sell-off.

WATCH: Robinhood: The controversial app worth $5 billion that's trying to upend Wall Street