Wells Fargo (WFC -0.03%) stock has surged more than 20% over the past 90 days, recently topping the $50 mark to reach its highest levels since early 2022.

Plenty of good news fueled the rise, but it's hard not to notice the spiking valuation. While the stock looks expensive compared to its recent past, there's more to this story than meets the eye.

Is Wells Fargo stock still a buy after the latest surge?

Good news is to blame

Many bank stocks surged in recent months after the Federal Reserve signaled an end to rising interest rates. While interest rate cuts aren't expected anytime soon, the end of rising rates is still a sigh of relief for an industry reliant on a humming economy to generate profits.

An end to interest rate hikes should also solve a key problem of late for banks, Wells Fargo included. Across the industry, there has been a steady increase in loan charge-offs, a metric measuring the percentage of loans a bank believes it will be unable to collect. In the last quarter of 2022, Wells Fargo's net charge-off ratio was just 0.23%, hovering just above historical lows. That figure, however, has increased every quarter since, finishing 2023 at 0.53%. To be sure, current levels aren't much to worry about, but the steady rise, mostly caused by borrowers facing higher interest rates, should level off now that the Federal Reserve has stepped back.

Investors are also gaining confidence that banks will be better positioned to handle a potential economic downturn. Basel III, a stricter set of rules governing international banking regulations, is expected to arrive as early as 2025, and most banks have been preparing in advance. Wells Fargo's Tier 1 capital ratio, for example, which compares a bank's capital to its assets, has risen from 10.6% in 2022 to 11.4% today. The current regulatory minimum is just 8.9%, meaning Wells Fargo is prepared not only for economic disruption today but also for any increase in regulatory requirements down the line.

Is the valuation really that high?

Market sentiment has shifted toward the positive in recent months, but what effect has it had exactly on Wells Fargo stock?

In early November, shares traded at a price-to-book multiple of 0.85. That is, the market was willing to pay $0.85 for every dollar of Wells Fargo's assets. At the peak of the surge, shares reached price-to-book multiples as high as 1.10, though things have now settled to around 1.05.

WFC Price to Book Value Chart

WFC Price to Book Value data by YCharts

Considering price-to-book multiples are one of the best ways to gauge the attractiveness of a bank stock, is Wells Fargo suddenly too expensive? That depends on your time horizon.

Over the short term, anything can happen. As you can see from the chart above, Wells Fargo's valuation is constantly gyrating, and a return to pre-surge levels is certainly possible. But if you're a long-term shareholder, there's reason to believe shares still offer a compelling opportunity for profit.

For years, Wells Fargo stock has been under artificial pressure due to a 2016 scandal in which it created millions of accounts without customer authorization to boost performance figures. The federal government fined the bank $3 billion for its actions while also instituting an asset cap, limiting how large the bank could grow. Wells Fargo also agreed to an overhaul plan with a third-party review, though this has taken several years to implement.

Bank executives now believe the restrictions could be lifted as early as the first quarter of 2025. That's still a ways off, but there's a reason Wells Fargo stock still trades at a historically low valuation, even after the recent run-up. Pre-scandal, for reference, Wells Fargo stock traded at a 30% premium to banking peer JP Morgan on a price-to-book basis. Now, it is JP Morgan that trades at a 30% premium to Wells Fargo.

Patient investors can lock in the bargain price today -- just know it will likely take several years for the restrictions to be lifted and for the bank to reinitiate its growth trajectory.