What happened

Shares of Ally Financial (ALLY -0.07%) have lost nearly half of their value over the past year as investors worried its automotive-heavy loan portfolio would be hard hit by macroeconomic trends. On Friday, the company reported results that suggest it is holding up a lot better than some had expected, and its share price surged. As of 10:45 a.m. ET, the stock was up by about 15.6%.

So what

Automotive lending runs deep in the roots of Ally Financial. The bank was founded a century ago as the lending arm of General Motors. The automaker sold a majority stake in the business, then known as GMAC, in 2006, and the two were fully separated during the financial crisis, with GMAC adopting the Ally name in 2009.

But auto loans still make up a significant portion of Ally's loan book. That became a cause for investor concern in 2022 as rising interest rates and falling used car values increased the level of risk on Ally's balance sheet.

The company's fourth-quarter earnings report helped put some of those fears to rest. Ally earned $1.08 per share on revenue of $2.2 billion, beating analysts' consensus expectations for $1 per share in earnings on $2.05 billion in sales. Ally appears to be doing a good job pricing its loans in a rising interest rate environment. It generated an estimated retail auto originated yield of 9.57% in the quarter, up 260 basis points year over year.

Ally was also helped by its insurance operations, which generated pre-tax income of $101 million in the quarter compared to a $30 million loss in the third quarter.

"In 2022 Ally continued its strategic evolution while navigating a fluid macroeconomic environment," CEO Jeffrey J. Brown said in a statement. "The optimization across our businesses was evident in our ability to generate record net interest margin and total revenue. We continued to expand our customer base, now 11 million strong, as our customer-centric products continue to resonate in the market."

Now what

The operating environment remains difficult for Ally. Brown said the bank is "continually assessing the macroeconomic backdrop," and adjusting accordingly. Ally's consumer auto loan originations in the quarter were down year over year, to $9.2 billion from $10.9 billion, and the bank's provision for credit losses jumped by $376 million to account for the added strain on the consumer.

Investors need to be aware that conditions could get worse before they get better.

These latest results are, however, an indication that Ally is weathering the storm, and making steady progress in diversifying its balance sheet. Ally's mortgage, credit card, and other non-auto lending portfolio has grown at a compound annualized rate of 26% since 2014, from $5.4 billion to $33.4 billion. While that lending is not without risk, the overall risk profile of the company is evolving.

Ally's rocky road could continue into 2023, but for long-term-focused investors, it appears the lender remains on the right course.