We're coming off an up-and-mostly-down week for the stock market. The S&P 500 fell 4% from last Friday to this past Wednesday, before rebounding by 2.7% through the end of the week. Anyone who was invested in equities during the pandemic-driven rout of last spring -- and who stayed the course to enjoy the rebound that followed -- will understand that pullbacks aren't necessarily reason to panic. That said, market drops can be unsettling while they're happening.

One strategy that can help investors keep their cool in falling markets is to focus on buying and holding solid companies that can be expected to prosper over the long term -- businesses built to weather short-term fluctuations and achieve excellent returns over time. Mastercard (MA 2.49%) is one such company.

A man, holding a phone, looking out the window, depicting someone looking long-term.

Image source: Getty Images.

A decade of dominance

Mastercard has been a great stock for a long time. Case in point: Over the 10-year period ending Friday, the payment-processing giant has delivered an annualized return of better than 29%. Over that same period, earnings per share have grown at a nearly 16% annual rate. Most investors would take a stock with results like those in a heartbeat.

The company's success has been driven by a few key factors. First, Mastercard is a dominant player in an important field with few real rivals. Only Visa's payment processing network is larger, and their other competitors really don't play in the same league. This duopoly isn't going to change anytime soon because of the power inherent in the huge networks that they've built.

Mastercard also has an effective business model. It makes most of its money from the fees paid on every transaction made using its cards. It is not a bank, so it shoulders none of the credit risk that lenders do. And there is relatively little overhead, as there's no product to sell. Its revenues are largely tied to how much people are spending. The past decade included the longest period of GDP expansion in U.S. history, so consumer spending rose, which drove the company's earnings higher and higher.

This has supported huge margins and tons of free cash flow. Mastercard has an operating margin (the percentage of revenues that are converted into earnings after it covers its expenses) of 52.7%. And it had about $6.3 billion in free cash flow last year. Further, its return on equity was 109%, which means that for every dollar of shareholder equity, the company is making more than a dollar in profit. In sum, it's an extremely efficient operation, and has lots of capital to weather any downturns and to invest in innovations, technology, and acquisitions that could spur growth.

Why its success will continue

Last year was relatively difficult for Mastercard. Revenue fell due to the pandemic and the economic downturn. Its cross-border transactions took the biggest hit, mainly due to the steep decline in travel. Yet Mastercard's stock price still rose by 20%. That's because, despite the economic slowdown, the company benefited from an ongoing macro trend that was accelerated by the pandemic -- the shift toward cashless and contactless payments. Despite the headwinds, its gross payment volume was actually up 1% last year.

We can expect the trend away from cash will continue. A recent survey by Mastercard found that between Q1 2020 and Q1 2021, contactless payments increased by at least 50% for in-person transactions in more than 100 markets.

Specifically, Mastercard processed 1 billion more contactless transactions in the first quarter of this year than it did in the prior-year period. It also found that 71% of those surveyed said they intend to use cash less often. As a leading credit and payment processor, it will surely benefit from this trend.

As of Friday close, Mastercard's stock price was up only 2% year to date, but as the U.S. economy revives and more people resume traveling, the company is expected to generate strong earnings growth. Mastercard has all of the characteristics of a company that can generate excellent long-term share price gains.