Shares of Bank of America (BAC -0.05%) have done quite well recently. As of this writing, they have soared 30% just in the past six months (as of May 21), a gain that outpaces the S&P 500. Perhaps investors remain optimistic that interest rates will decline sooner rather than later, which could spur lending growth for the business.

With positive market sentiment on its side, should you buy this top bank stock right now?

Growth potential

Bank of America's scale is hard to overstate. The company raked in $99 billion of revenue (net of interest expense) in 2023. And as of March 31, it had assets worth a whopping $3.2 trillion on its balance sheet.

Investors looking to buy and hold the stock for the long haul need to consider what kind of growth the business can achieve as we look ahead. All else being equal, higher growth is certainly preferable to lower growth. But in Bank of America's case, it's best to have tempered expectations.

The company has a massive deposit base of $1.9 trillion. It's really difficult to continue seeing sizable inflows that can move the needle. It's the same story when we look at the loan book, which shrunk in the past three months.

Bank of America is a mature enterprise that already has a broad array of various products and services. And it has mostly penetrated its key U.S. market. This helps explain why total revenue has only increased at a compound annual rate of 1% between 2013 and 2023. I don't see any reason to believe this trend of muted growth will be much different in the years ahead.

Competitive advantages

The company's growth outlook will be impacted by the intense competition in the financial services sector. Direct rivals include other money-center banks, such as JPMorgan Chase, Wells Fargo, and Citigroup, all of which have vast resources to continue winning over customers.

We also can't ignore the rise of fintech banking service providers. SoFi Technologies, Robinhood, PayPal, and Block, for example, are doing a good job catering to younger, digitally savvy consumers with compelling product offerings and a superior user experience.

However, Bank of America is in a favorable position to defend itself because it possesses some competitive advantages. This is one of the strongest brands out there, which helps the business build trust with its client base, whether individual consumers or large multinational corporations.

Plus, given its broad reach, Bank of America has tremendous scale that allows it to acquire deposits cheaply that are sticky. "On average, 68% of our deposit balances have been with us for more than 10 years," CEO Brian Moynihan said on the Q1 2024 earnings call.

This gives me confidence that Bank of America isn't necessarily going to be disrupted anytime soon. It should still be a dominant player in the industry decades from now.

What about the valuation?

Despite having an economic moat, which is a top indication that a business is high quality, investors shouldn't rush to buy shares just yet. That's because valuation is another critical factor to consider.

As of this writing, Bank of America stock trades at a price-to-earnings ratio of 13.5. That's much more expensive than just six months ago, and it's higher than the trailing five-year average.

Another valuation metric to look at is the price-to-book (P/B) ratio. A multiple below 1 usually indicates shares are undervalued. Right now, this stock trades at a P/B ratio of 1.2. This has gone up considerably in the past several months as well.

In my opinion, Bank of America's shares aren't set up right now like they can outperform the S&P 500 over the next five years, despite being a leader in the financial services industry. That's why I'm not a buyer today.