Large digital-only consumer bank Ally Financial (ALLY 3.55%), which specializes in auto lending, and artificial intelligence-based loan company Upstart Holdings (UPST 2.71%) have generated no shortage of headlines this year.

Shares of Ally got scooped up by Warren Buffett's Berkshire Hathaway in both the first and second quarters of the year, putting the company on the broader market's radar. Upstart was one of the hottest new fintech stocks to emerge during the pandemic, rising to some incredibly high valuations in late 2021. Since then, shares have come crashing down in the harsh environment but now trade at a much more reasonable valuation.

After such a hectic 2022 thus far, let's take a look at which one is the better buy right now.

Upstart: An enormous market opportunity

Upstart's mission from the very beginning has been to more efficiently underwrite loans and enable more borrowers to access traditional lending products than they could under more traditional underwriting standards such as Fair Isaac's FICO credit scoring.

Upstart started with personal loans, has begun to apply its credit underwriting algorithms to auto loans, and aspires to get into mortgage lending and small business lending as well. The opportunity of all these different lending areas combined is worth trillions of dollars, largely due to the enormity of the mortgage market.

During the pandemic, when credit conditions were benign due to high savings, easy-money policies by the Federal Reserve, and fiscal stimulus from the federal government, Upstart took off, originating roughly $11.75 billion of originations in 2021 and quickly grabbing leading market share in the personal loan space. The stock briefly traded over a $30 billion market cap late last year.

But since then, things changed dramatically as the Federal Reserve rapidly increased interest rates to combat soaring inflation. Upstart sells the majority of its loans to institutional investors through whole-loan buyers and the securitization market. But as this group of investors saw a rising cost of capital and a bleaker economic outlook, which could lead to higher loan losses, funding for Upstart loans quickly dried up, leading Upstart to cut its growth outlook and financial projections for the year.

Ally Financial: The largest digital bank in the U.S.

Fintech companies like Upstart are young upstarts and gained a lot of attention during the market run-ups of the previous two to three years, whereas Ally has really been operating as a large-scale fintech company for several years, with no branches and close to $109 billion in assets under management. The company specializes in retail and commercial auto lending but also offers deposit accounts, mortgages, credit cards, personal loans, and online investing capabilities.

Ally thrived during the pandemic, in part, because of the computer chip shortage that led to a decreased inventory of cars and other vehicles, which resulted in high demand and soaring car prices. Between the second quarter of 2019 and the second quarter of 2022, Ally saw its dealings in retail auto loans grow by $9.5 billion. In the second quarter of this year, the average yield on Ally's retail auto loans was a strong 7.82%. Ally has also improved its funding mix in recent years by significantly growing deposits.

Strong tailwinds enabled Ally to generate some excellent returns in recent years. But investors worry that Ally could be in trouble because used car prices are about 60% higher than they were in 2019 and eventually those may come back down. Ally's management team is baking in a 30% decline in used auto prices by some time in 2023.

Still, retail auto loan delinquencies jumped in Q2 and Ally will deal with significantly higher funding costs moving forward. But management believes it is capable of generating a 16% to 18% return on tangible common equity (ROTCE) in the medium term and only trades at about 84% of its tangible book value, or net worth.

And the better buy is...

Upstart undoubtedly has the bigger market opportunity and could revolutionize credit underwriting, but I don't believe the company is anywhere near achieving this. Also, Upstart faces funding and credit headwinds if the Fed keeps raising rates.

I'm certainly concerned about used car prices plummeting, but I'm very confident in Ally's management team, which has years of experience at Ally and in the car business. Keep in mind that Ally is deeply rooted in the auto industry, having been spun off from General Motors in 2006. Berkshire, which has held a position in GM for many years now, also knows the industry quite well.

Ally progressed a lot in recent years, although I would like to see it continue to improve its funding base. If Ally can successfully navigate the environment as car prices come down, it will absolutely see its stock price move. At its beaten-down valuation, Ally also has an annual dividend yield of nearly 4%.

I see Ally as the better buy here because I understand the risks it faces better and I believe there is a clearer path to a higher valuation.