If there's a pullback in consumer spending, you wouldn't know it by following PepsiCo's (PEP -2.59%) latest earnings. The company recently reported accelerating revenue and earnings growth, gushing cash flow, and healthy sales volumes. Management also raised its 2022 outlook thanks to strong overall results through early September.

This performance confirms that investors have been right to flock toward PepsiCo's stock for much of 2022. But it isn't too late for new investors to seriously consider buying this stock too. Let's look at three reasons PepsiCo stock is still a buy.

1. PepsiCo's segments are reporting rising volumes

PepsiCo reported a 9% year-over-year sales increase through early September, but that figure understates its blazing momentum. After adjusting for currency exchange rate shifts and divested products, organic sales rose 16% in the third quarter.

That result represents an acceleration over the 13% rate that investors saw through the first two quarters of the year. It also puts Pepsi near the top of the packaged foods industry. For context, strong performer McCormick recently announced a 6% organic sales increase.

Look deeper, and you'll see even more reasons to be bullish about PepsiCo's growth. Sure, sales volumes declined slightly in its snacks business. But beverage volumes are up, and pricing shot higher across all of its categories. It is a good sign for the business that Pepsi can pass along higher costs without sacrificing market share in the process.

2. PepsiCo is generating increased margins

PepsiCo's finances are sparkling. Gross profit margin held steady and operating profit margin expanded at a time when many peers are reporting declines. That success adds weight to management's claim that PepsiCo's dominant industry position allows it to maintain unusually high profits.

Executives said in a conference call that shoppers are navigating toward trusted brands even as they look to save money in other parts of their budgets.

Standout food products here included energy drinks, alcoholic beverages, and innovative salty snacks. "Demand elasticity trends have remained favorable," executives said in a conference call, meaning consumers didn't balk at price increases.

3. PepsiCo has a bubbly outlook

PepsiCo's prior 2022 outlook was positive, but it looks even better right now. Management now sees organic revenue rising by 12% compared to the prior 10% goal. Revenue expanded by double-digit percentages for four consecutive quarters now, and the company forecast implies further solid gains on the way.

Earnings are forecast to increase by 10%, rather than the 8% rate that executives predicted a few months ago. Sure, it is possible that consumers will become more cautious in their spending on snacks, meals, and beverages. But Pepsi sees no evidence of slowing demand to date.

All of these factors make it likely that Pepsi will deliver another year of market-thumping results in 2022. Add in a dividend that is almost certain to rise for its 51st consecutive year in 2023, and you've got the ingredients you need for strong stock returns.

Investors can't be certain that PepsiCo will sail through any recession that might develop over the next few quarters. The growth and earnings outlook would surely worsen in that scenario. But investors shouldn't let that prospect keep them away from a business that is gaining momentum in several massive global food niches.