There's no question that based on his track record running Berkshire Hathaway (NYSE: BRK.A) (NYSE: BRK.B), Warren Buffett is one of the best capital allocators ever. Investors are smart to file through the conglomerate's public equities portfolio to find new ideas. 

One company Berkshire has owned for years is Visa (V 0.43%). And it has certainly delivered, as a $10,000 investment in the stock at its initial public offering in 2008 would be worth $171,000 as of this writing, translating to a greater than 1,600% gain that trounces the S&P 500. Today, the card giant represents a stake worth $2 billion in Berkshire's portfolio. 

Let's take a closer look at this unstoppable financial services business and whether it's a solid investment right now. 

A wide economic moat 

Buffett's favorite quality to look for when identifying companies to buy is the presence of an economic moat, which simply means the business has traits that allow it to defend against rivals in the industry, in addition to new entrants trying to enter the market. And by having an economic moat, a company should be able to generate strong financial returns for a long time. 

Since Visa essentially sits in the middle of a two-sided platform, its moat is the existence of network effects. On one side, there are billions of cards worldwide with the Visa name and logo on them. On the other side, there are 100 million merchant locations that accept payment from them.

The vast number of cardholders makes it a no-brainer for merchants to accept Visa. And because Visa is accepted everywhere, people love having a Visa card in their pockets to pay for things daily. 

At a big-enough scale, network effects lead to outstanding profits. Visa's operating margin in the most recent fiscal quarter (Q3 2023, ended June 30) was a superb 62%. And in the last fiscal year, the company generated $18 billion of free cash flow on revenue of $29.3 billion. 

Secular trends 

Between fiscal 2012 and fiscal 2022, Visa's revenue increased at a compound annual rate of 11%, with net income rising at a 22% clip. This growth has undoubtedly been key to the stock's impressive rise during the same time. But the gains wouldn't be possible without some powerful tailwinds. 

The most obvious long-term trend that Visa has benefited from is the decline in the use of cash for transactions. Today, it's probably rare for most people to even carry cash in their wallets, thanks to just how convenient and seamless it is to use a credit card. Plus, the attractive perks and rewards credit cards offer are certainly effective at getting consumers to spend with them. 

But the war on cash isn't the only secular trend that has worked in Visa's favor. It could also be argued that the rise of e-commerce helped as well. The emergence of Amazon spurred other retailers to develop their omnichannel capabilities, while spawning new internet-only merchants. And this pushed for an increase in customer accessibility and convenience, incentivizing greater use for consumers to pay with their cards. 

Should investors buy Visa? 

Visa is a wonderful company. Its powerful network effects continue to define its dominance in the payments space. And the capital-light nature of its business model has resulted in fantastic profitability. But is the stock worthy of an investment today? 

The shares have trailed the S&P 500 in 2023 (as of Aug. 9), even though they have still risen 15%. This underperformance is despite Visa continuing to post strong financial results each quarter. Investors can buy the stock today at a forward price-to-earnings ratio of 28. That seems like an attractive entry point for such a great business.