Visa (V 0.52%), the world's largest electronic payments company, has seen its stock price move steadily upward over the past decade. Over the past 10 years, the stock has posted an annualized return of more than 28%, which is far better than the S&P 500's return over that span. This year, through the COVID-19 pandemic, it has continued to rise, up almost 9% year to date, and was trading around $204 per share at Wednesday's close.

Visa has a price-to-earnings (P/E) ratio of about 39, which is higher than the S&P 500 average. The P/E ratio is a commonly used valuation metric that measures a company's share price compared to its annual earnings per share. A high P/E ratio can be dangerous if the expectations don't match the reality of the company's future growth prospects.

Some investors may be wondering if Visa has grown too expensive, given its higher P/E ratio. While it may look expensive to some, it is not. In fact, Visa looks like a great buy. Here's why. 

Blue, silver, and gold credit cards stacked on top of one another.

Image source: Getty Images.

Earnings beast

One way to look at the P/E ratio is that it is generally a measure of the market's expectations of a company's earnings. Basically, the higher the P/E ratio, the more growth investors are expecting from that company. Whether that expectation is grounded in good fundamentals and sound earnings potential or irrational exuberance is another question. As far as Visa is concerned, it is the former.

Visa has been an earnings beast the past few years, with double-digit revenue and annualized earnings growth over the past decade. The company is also extremely efficient, with huge profit margins. It had a 49% operating margin in its fiscal third quarter, which ended June 30, and it has consistently been around 50% for the past few years.

Given Visa's excellent history of earnings growth and the strong potential for future earnings growth, Visa is not only not expensive at that P/E, but is relatively cheap compared to its peers. It also has an even brighter future.

Gotta wear shades

Visa saw revenue decline 17% and net income decline 23% in its fiscal third quarter on declines in payments volume due to the pandemic. But the company has been seeing promising trends in recent months. In August, U.S. payments volume at Visa climbed 7% year over year, with spending bouncing back as people returned to work and school. That follows an 8% year-over-year increase in July.

But there is a larger trend at play that bodes well for Visa's future. As the leading credit processing company, Visa is at the forefront of the cashless trend. With the emergence of electronic payment platforms, online retailers, and digital banks, the world is moving away from cash to digital and card payments. By 2030, some Asian and European countries will be almost entirely cashless, according to Global Data, and all economies are moving in that direction, including the U.S. A recent study by Visa's main competitor, Mastercard, says many countries -- including Singapore, France, Sweden, and the Netherlands -- are 60% cashless right now. The U.S. is not far behind, at 45%. In the next 10 years, and beyond, those percentages will continue to climb.

Also, Visa stands to benefit from an acquisition it made earlier this year of the fintech company Plaid, a mobile payments processor. Through Plaid, Visa is poised to expand its market and gain a foothold in the mobile payments market.

Analysts predict about 14% annual earnings growth for Visa over the next five years. With that kind of earnings power, in a booming industry, with great operational efficiency, Visa is indeed a buy.