A decade ago, big banks like Bank of America (BAC -1.07%) and Wells Fargo (WFC -1.11%) were on the verge of facing challenges that would threaten their very existence. Now, they've both recovered sharply, finding ways to survive the financial crisis and restore their businesses to reflect the better times for the U.S. economy.

Yet along the way, other issues have come up that have ramifications for these banking giants. After a big run-up for the banking sector, smart investors want to know whether these stocks have further to go or could be vulnerable to a pullback. Let's look more closely at Bank of America and Wells Fargo to see how they stack up on key metrics, so that you can decide which is the better buy right now.

BankAmericard sample card featuring Bank of America logo.

Image source: Bank of America.

Stock performance and valuation

Bank of America and Wells Fargo have similar businesses, but their stocks have produced very different returns for investors. B of A is up 34% since February 2017, but Wells Fargo is essentially flat, having risen just 1% over the same period.

Looking at basic valuation measures produces some interesting conclusions. When you look back at what the two banks have earned over the past year, Bank of America looks like the more expensive stock, trading at 20 times trailing earnings compared to an earnings multiple of just 14 for Wells Fargo. However, when you incorporate expectations for future earnings performance, the two stocks converge, with both sporting a forward earnings multiple of between 10 and 11.

The two stocks have also seen their valuations relative to book value come closer together. For years following the crisis, B of A traded at a discount to book value. Now, the bank giant has a price-to-book ratio of about 1.3, compared to Wells Fargo's 1.55. The two stocks are close on valuation, but performance clearly pushes the needle toward Bank of America.

Dividends

Prior to the financial crisis, bank stocks were among the top dividend payers in the market. At this point, Wells Fargo pays a yield of about 2.7%, which is attractive compared to B of A's 1.5% dividend yield.

Wells Fargo was able to get its dividends back up toward pre-crisis levels much more quickly than Bank of America has managed. By 2014, Wells had started paying more in dividends than it had in 2008, and subsequent growth has pushed the payout even further upward. By contrast, Bank of America didn't make any dividend increases until 2014, and it's been playing catch-up ever since. Now, the question is whether Bank of America will be able to keep boosting its payout even as Wells Fargo's dividend growth has slowed considerably over the past few years.

Growth prospects and risk

Bank of America did extremely well in 2017, and 2018 could be an even better year for the banking giant. B of A has worked hard to develop internal efficiencies to make the most of tough conditions in the industry in recent years, and that has the potential to help it take greater advantage of opportunities now that interest rates are starting to rise. The ability to boost returns on assets and equity could lead to faster growth for Bank of America, and the long-term gains in book value that have helped spur B of A's share-price increases look poised to get back on track in the coming year. With solid growth in key retail areas like deposits and loans and smart investments in technology to woo younger customers, Bank of America is moving in the right direction.

Meanwhile, Wells Fargo faces new challenges. The company just took a big hit from the Federal Reserve, which said that it will not allow the bank to expand its asset base beyond end-of-2017 levels until Wells can demonstrate it has made what the Fed called "sufficient improvements" to remedy questionable practices like the behavior that led to millions of fake customer accounts being created back in 2016. Investors had started to hope that Wells Fargo was recovering from the aftermath of that scandal, which had damaged its reputation and led customers to consider competitors like Bank of America. Now, the new restrictions could prevent Wells from fully enjoying better industry conditions, and shareholders aren't thrilled with those prospects going forward.

All told, Bank of America looks like a better buy for investors right now. Despite a lower dividend yield, the combination of reasonable valuation, dividend growth prospects, and better opportunities to capitalize on potential industry expansion put B of A in a better position than Wells Fargo right now.