The Dow Jones Industrial Average closed at a record high last week, and the S&P 500 is right behind it. Inflation is moderating, economists say there's a falling risk of a recession, and the Federal Reserve signaled that it might begin to cut interest rates next year.

All that points to a high chance that the markets will reach new heights in 2024. Many stocks will benefit, but Visa stock (V -0.23%) has a history of surging in good times.

Visa powers the economy

Visa operates an unbeatable credit card network that powers global payments. But it also provides integrative client services and alternative payment solutions.

It's the largest network in the industry, with more than 130 million merchants and 4.3 billion cards. It works with 14,500 financial institutions worldwide, and it processed $15 trillion in payment volume over the 12 months ended Sept. 30.

When the economy is doing well, and shoppers are spending, Visa's revenue increases. When the economy is tight, and shoppers hold back, Visa feels the pressure. That's why, in many ways, Visa's performance is a more direct reflection of overall economic trends than that of other companies. Visa's model is low-risk because people are always spending, even though it goes up and down.

Amid a powerful bout of inflation during the past two years, Visa has continued to pump out revenue and profit increases. Consumer spending has largely held up, driven by a continued resurgence in post-lockdown travel and leisure. The Fed so far has managed the tough job of keeping the economy running without triggering a recession. Visa revenue increased 11% year over year in fiscal 2023 (ended Sept. 30), and earnings per share (EPS) rose 18%.

Visa is also extremely profitable. It runs an asset-light model, and it takes a small fee every time a cardmember swipes. That's incrementally higher revenue with little increase in operating expense, leading to hefty margins. Visa's net profit margin is wider than many companies' gross margins (profit before many overhead costs are deducted), with more than half of every dollar of revenue turned into a profit. The profit margin has steadily increased over time.

V Profit Margin (Quarterly) Chart

V Profit Margin (Quarterly) data by YCharts.

Visa is a top market-beating stock

As the economy looks like it's stabilizing, investors are becoming more enthusiastic and pushing the major indexes closer to a new bull market. If shoppers begin to spend more in 2024 and the market rises, Visa will benefit.

Visa's performance usually mirrors the economy, and its stock price thrives during bull markets. But it's been an incredible market-beating stock, gaining more than double the S&P 500 during the past 10 years.

^SPX Chart

^SPX data by YCharts

Notice how closely Visa stock waxes and wanes along with the market. And no, most stocks aren't as highly correlated. Visa's management isn't relying on tailwinds to keep business going, and it's heavily investing in improving and launching new products. However, it has historically moved in tandem with the market, and that's likely to continue.

Often, stocks as large and established as Visa are past their high-growth days. But Visa's dominance, stickiness, and place in the economy, as well as its ability to squeeze huge profits out of revenue, are strong drivers that should keep it way ahead of the market for decades to come. That makes it a long-term buy, as well as an investment that could beat the market in 2024.