As many companies are still facing a difficult operating environment, it's no surprise that investors' minds continue being consumed with the uncertain economic outlook. Inflation is cooling, to be fair, but the Federal Reserve is staying on its rate-hiking path. This means it's probably still a good time for investors to reassess their portfolio strategies to make sure they are still on the way to achieving their financial goals. 

Without a doubt, it's still a great idea to own wonderful companies over the long term. Some of them are hiding in plain sight, as they can be the biggest businesses in the world. Visa (V 0.33%), for example, just reported a superb quarter. And as of this writing, shares are up 11% on the year, better than the S&P 500's gain. 

Here's why you should buy this mega-cap stock and hold it forever. 

Visa posted a strong quarter 

For its fiscal 2023 second quarter, which ended March 31, Visa posted net revenue of $8 billion and diluted earnings per share of $2.03. Both of these figures not only beat what Wall Street analysts were expecting, but demonstrated double-digit year-over-year gains. This strong showing continues an ongoing trend of Visa exceeding estimates. That's certainly something shareholders love to see from the businesses they own. 

To dig a bit deeper, Visa's payments volume increased 10% year over year to nearly $3 trillion in the quarter, a clear indicator that spending activity remains healthy. Even more noteworthy was the 24% jump in cross-border volume. "The cross-border travel recovery continues at the pace we expected," said CFO Vasant Prabhu, on the Q2 2023 earnings call. In particular, Asia is performing very well, thanks to the easing of pandemic-related restrictions. 

Looking ahead, analysts expect greater than 10% revenue growth in each of the last two quarters for the remainder of this fiscal year. But based on the company's undeniable momentum and resilience, it's not farfetched to believe these targets could be exceeded.

Visa can be a foundational portfolio holding 

As I noted earlier, Visa's stock has outperformed the broader market so far in 2023. And over the past five- and 10-year periods, the stock has crushed the S&P 500. Moreover, the company's strong fundamental performance, particularly at a time of heightened economic uncertainty, has resulted in a price-to-earnings (P/E) ratio of 30.9 (as of May 11). This is about on par with the stock's trailing 12-month valuation, but it is significantly more expensive than the P/E of roughly 25 that Visa shares commanded in October last year. 

As a result, investors are likely being asked to pay a premium price for the stock today. This argument makes sense given that higher interest rates should be a major headwind for stock valuations. But in Visa's case, its elevated P/E ratio could be an indication that shareholders view the company as a safe haven asset right now. 

In the same vein, despite its elevated valuation, investors should still consider buying and holding Visa shares for several important reasons. For starters, this business is a natural inflation hedge. Companies with proven pricing power can be attractive investments when inflation is running hot. But because Visa essentially takes a tiny cut of all activity happening across its network, it also benefits from the potential for higher revenue when prices go up. That's a fruitful position to be in. 

Visa is also incredibly profitable. Over the past five full fiscal years (2018 through 2022), the business's profit margin averaged a ridiculous 51%. That's an outstanding figure many companies can only dream of. Credit goes to Visa's capital-light business model, where every additional transaction that's processed carries high margins. This also results in lots of free cash flow, which management directs toward dividends and stock buybacks. This friendly capital-allocation policy only helps to boost shareholder returns. 

Perhaps the most compelling reason to still like the stock despite its steep valuation: Visa easily has one of the strongest economic moats in the world. The company currently has over 4.2 billion of its cards in circulation across the globe, with more than 100 million merchants accepting its payments.

This creates a massive and powerful network effect. Unless you're Mastercard, the industry rival that Visa has a rational competitive relationship with, it's virtually impossible to compete with this kind of dominance. Good luck getting banks to issue your credit cards and merchants to accept them. This makes it extremely hard to argue with Visa's competitive position. 

Another strong quarter, coupled with other favorable characteristics, makes Visa an attractive mega-cap stock to buy and hold forever.