Bank of America (BAC)   is boosting its stock-buyback program by 36% after quarterly profit topped analysts' estimates amid a trading surge following Donald Trump's surprise victory in the U.S. presidential campaign.

The Charlotte, N.C.-based lender will repurchase an additional $1.8 billion of its shares, expanding its total buyback for the next six months to $4.3 billion, said CFO Paul Donofrio. After passing the Federal Reserve's annual stress tests last summer, Bank of America had said it would repurchase up to $5 billion in stock in the year through June 30.

Earnings of 40 cents a share in the three months through December beat the 38-cent average of projections in a Bloomberg survey. Bank of America said in a statement that net income climbed 43% from a year earlier to $4.7 billion, reflecting a 6% gain in interest income as well as increased lending.

"Our strategy is working," CEO Brian Moynihan said in the statement. "We are lending more and seeing historically low charge-offs, which is what responsible growth is all about."

The country's second-largest financial institution by deposits, Bank of America is poised to benefit from the more rapid economic growth Trump and his Republican allies in Congress have promised, as well as three possible interest rate hikes by the Fed. The increases would be a welcome turnaround after nearly a decade of rates below 1%. 

The company's net interest margin, which measures interest income from borrowers after payments to depositors, was 2.23% in the fourth quarter, unchanged from the previous three months, and up nine basis points from a year earlier. That compares with an estimate of 2.28% from Matt O'Connor of Deutsche Bank. 

Morgan Stanley analyst Betsy Graseck had projected the margin would flatline for large banks in the fourth quarter before beginning relatively steady increases through the end of 2018.

"The global economy and markets enter 2017 on considerably firmer footing than last year," David Folkerts-Landau, Deutsche Bank's chief economist, said in a report this week. "Fiscal stimulus and broad-based deregulation are expected to jolt the U.S. economy toward a long-term equilibrium of higher growth, inflation and interest rates."

For Bank of America, $10.3 billion in net interest income during the fourth quarter reflected only minimal benefits from the Fed's most recent interest-rate hike, which occurred late in the period, Donofrio explained. The change affects floating-rate loans almost immediately, and more of the benefit will be apparent in the three months through March.

Indeed, the bank projected that net interest income this quarter may rise as much as $600 million.

"Management's guidance was more positive than what is in our forecast, so we believe the stock will outperform on a relative basis," Brian Kleinhanzl, an analyst with brokerage Keefe, Bruyette & Woods, said in a note to clients.

Sales and trading revenue climbed 11% to $2.8 billion at the end of the year as the company benefited from volume gains after Trump's November win and Britain's unexpected decision to leave the European Union in June. The fixed-income business expanded by 12%, while stock-trading rose 7%.

Companywide, revenue gained 2% to $20 billion as sales in the consumer unit, the company's largest, reached $18.1 billion. Average loan balances there increased 8% to $254 billion amid a surge in approved mortgages, even as new applications slowed.

The pipeline narrowed by 36% from the previous three months, a change Donofrio said was largely because of higher interest rates.

Bank of America rose 0.4% to $23.01 at the close of regular trading in New York. The shares previously climbed 35% to $22.92 following Trump's election.

More from Investing

Quick Read: 3 Things for Investors to Know Before Wednesday's Trading Session

Quick Read: 3 Things for Investors to Know Before Wednesday's Trading Session

Replay: Jim Cramer on the Markets, Oil, General Electric, Zillow and Micron

Replay: Jim Cramer on the Markets, Oil, General Electric, Zillow and Micron

Pegasystems Founder Explains Why He Has One of the Hottest Tech Stocks Around

Pegasystems Founder Explains Why He Has One of the Hottest Tech Stocks Around

Adobe Isn't Just Going After Shopify With Its Latest Acquisition

Adobe Isn't Just Going After Shopify With Its Latest Acquisition

Experts Break Down GDPR Risks for Investors

Experts Break Down GDPR Risks for Investors