The Dow Jones Industrial Average (^DJI -0.43%) has done a good job of outpacing some of its fellow stock benchmarks. Unlike broader measures like the S&P 500, the Dow focuses just about entirely on the giants of many different industries. Although it has concentrations and differences in exposure across various sectors the same way any index does, the Dow has been fortunate enough to have a stake in some strong performers during 2022. That has helped limit the Dow's losses in comparison to other indexes.

Indeed, a couple of Dow stocks reached all-time highs on Monday. It shouldn't come as a big surprise to see energy giant Chevron (CVX 0.06%) make the list, given how much the oil and gas industry has dominated the stock market so far in 2022. But the other company, McDonald's (MCD -0.53%), points to another consumer trend that has some investors thinking twice about other investments they hold.

Some obvious trends

Chevron does well when the oil and gas industry does well, and that was the case on Monday. Crude oil prices were actually relatively calm, rising only very slightly to move above $92 per barrel. However, a broad ETF based on oil and natural gas exploration and production companies moved up more than 3% on the day. That was enough to help boost Chevron's stock by more than 1% to hit a new record high.

Chevron has also been able to take advantage of strength in the industry in bolstering not only its current financial performance but also its longer-term prospects. On one hand, the company has delivered amazing quarterly numbers, including third-quarter earnings of $11.2 billion that represented 84% growth in just the past 12 months. The combination of higher prices and greater production helped spur the oil giant's success, particularly given the sizable investment in key areas like the Permian Basin that Chevron has made over the years.

As an integrated oil major, Chevron also has refining operations, and that portion of the business has profited handsomely from the unusually wide spreads between crude oil and refined products like gasoline and diesel fuel. With a relative lack of refining capacity worldwide and obstacles to bringing new facilities on line, Chevron stands to see long-term benefits from that segment as well.

Shareholders love Chevron for its high dividend yield and financially smart moves with its cash flow. The oil giant could well keep setting highs in the months to come.

There's gold in those arches

Also wowing investors was McDonald's, whose shares rose just a fraction of a percent on Monday. That was nevertheless good for an all-time high for the fast-food giant, and shareholders seem to like the combination of growth and defensive characteristics that McDonald's offers.

McDonald's investors recently celebrated the restaurant company's third-quarter results, even though the news was mixed. Global comparable sales jumped almost 10% year over year, and the U.S. market posted its ninth straight quarter of rising comps. However, overall revenue was down 5% to $5.87 billion, and although net income topped expectations, earnings of $2.68 per share were down 6% from where they were in the previous year's quarter.

The boom in McDonald's stock shows that investors are interested in taking advantage of consumer trends during periods of slowing economic growth. Many shareholders remember that during the Great Recession in 2008, McDonald's stock actually gained ground even as the S&P 500 fell 37%. In tough times, McDonald's picks up business from those who still want to eat out but who no longer feel comfortable paying for higher-price fast-casual restaurant outings.

Like Chevron, McDonald's also has a long history of paying healthy dividends. Add its ability to overcome some of the toughest conditions in years, and it makes plenty of sense why the fast-food titan is doing so well.