(Reuters) - Truist Financial said on Tuesday it has sold $27.7 billion of low-yielding investments to focus on better alternatives as part of a repositioning the lender expects will help it post higher revenue in 2024 than previously forecast.

Rate hikes by the U.S. Federal Reserve have created an incentive for banks to rejig their investment portfolios. Lenders that bought bonds during the near zero-interest rate era are looking to offload those securities and replace them with higher-yielding alternatives.

Banks are also building capital to deal with potentially tougher scrutiny as regulators get ready to finalize the Basel III proposals, though Fed Chair Jerome Powell hinted in March the rules could be much less burdensome than the industry had previously expected.

The sale of Truist's securities, along with the divestment of its insurance brokerage unit, left the bank with $39.4 billion in capital to deploy for investment.

The lender had injected nearly $18.7 billion of the total in short-duration securities and would hold the remaining capital as cash, it said.

The repositioning would generate 5.22% in yield for Truist, much higher than the 2.80% the offloaded investments would have offered.

The securities sale would result in an after-tax loss of $5.1 billion in the second quarter, but the bank said it now sees 2024 revenue declining by only 0.5% to 1.5% compared with last year.

It had earlier expected a drop of 4% to 5% when it reported earnings last month.

(Reporting by Niket Nishant in Bengaluru; Editing by Krishna Chandra Eluri)