It's been happy days for JPMorgan Chase (JPM 1.55%) investors. In the last two years, shares have produced a total return of 83% (as of June 24). That's well ahead of the 49% total return of the broader S&P 500.

JPMorgan now trades just 3% off its peak price. Clearly, the market is enthusiastic about this company and its near-term prospects.

But is this top bank stock a smart buying opportunity right now?

Financial trends

JPMorgan is currently benefiting from some strong business momentum. The company's net revenue rose 22.8% in 2023 to $158 billion, with diluted earnings per share (EPS) up 34.2%. This was driven by robust results in the consumer and community banking segment. And during the first three months of 2024, the top- and bottom-line growth continued.

The company reported that its deposit base expanded by 2%, with loans up 16% in Q1. These are both encouraging trends. And while the bank added $1.9 billion to its provision for credit losses, this was less than the $2.3 billion recorded in the year-ago period.

The thing to keep in mind here is that management still expects the uncertain macro backdrop to continue. However, once the Federal Reserve starts to lower interest rates, it could create a more favorable operating environment for JPMorgan.

Looking ahead, Wall Street consensus analyst estimates predict revenue and diluted EPS to rise at just over 2% per year between 2023 and 2026. This isn't anything to get excited about, in my opinion, as it reveals a weak growth outlook.

Competitive advantages

Investors can do well by investing in businesses that possess an economic moat. A moat is created by the presence of a single competitive advantage, or a combination of multiple. And this is precisely what can help a company defend against the threat of competition, which is fierce in the banking industry.

JPMorgan has cost advantages related to its scale. It has a massive and low-cost deposit base that not only helps fund loan growth but also supports a healthy net interest margin. Even better, these deposits are typically sticky. Moreover, scale provides other benefits, like being able to better leverage technology and marketing expenditures to the extent that smaller banks aren't able to.

You can also argue that JPMorgan has switching costs. Once consumers or corporations develop long-standing relationships with their banks, it's a hassle for them to change providers. In this case, the fact that JPMorgan has such an exhaustive menu of products and services opens up cross-selling opportunities that help satisfy its customers' various needs, locking them in even further.

Investing perspective

JPMorgan appears to be on strong footing right now, as demonstrated by its latest financial figures. Furthermore, it's hard to deny that the business lacks clear competitive strengths. It's the largest bank in the U.S., which provides its own set of scale and brand benefits. I think the vast majority of investors would agree that JPMorgan is a high-quality enterprise.

But just because a business is above average, it doesn't mean the stock is an automatic buy for an investor's portfolio. Valuation is a critical part of the decision-making process. All else equal, it's always better to pay a cheaper price for a stock, as this indicates that a margin of safety is present. On the other hand, if you pay too high of a price, future returns could disappoint.

As of this writing, JPMorgan Chase trades at a price-to-book (P/B) ratio of 1.9. The shares have rarely been more expensive in the past 19 years. What the market is telling me is that it's very optimistic about JPMorgan's latest performance and its future.

I'd say that the stock is currently overvalued based on the P/B multiple. Investors should continue to follow this business and wait for a more attractive entry price.