The stock market rally has made it harder for investors to find attractive deals these days. With the S&P 500 setting fresh records, many stocks are trading near -- if not at -- their all-time highs.

Yet there are always areas of the market that have fallen out of favor. Currently, investors are moving away from consumer staples giants like PepsiCo (PEP -0.62%) due to their relatively weak short-term growth prospects. The beverage and snack food giant is facing some demand challenges, to be sure. But that's no reason to abandon this successful business. So let's look at why you might want to buy Pepsi's shareholder-friendly stock while it's trading close to its 52-week low.

The bad news

The stock's poor performance lately can be pinned entirely on Pepsi's slowing growth rate. Organic sales rose a healthy 10% in 2023 on top of big gains a year earlier, but things started to change for the worse in Q4. Growth decelerated to 4.5% from 9% in the prior quarter and management sees the slowdown continuing at least through fiscal 2024.

Two big factors are driving this moderation, though neither means that Pepsi is losing market share. Instead, shoppers are reverting to their pre-pandemic grocery spending habits after several years of elevated demand for snack foods and at-home beverage products. That shift is happening while inflation slows to further pressure sales growth. Together, these trends have Pepsi projecting that organic sales gains will land at just 4% this year, or less than half of last year's expansion rate.

The good news

Pepsi's efficient business can do a lot with modest growth, though.

Earnings jumped 14% last year to outpace the 10% sales boost for the period. In other words, Pepsi grew sales while also widening its profit margin. Investors can expect to see another margin improvement in 2024 as the company cuts costs and focuses on popular niches like energy drinks and sparkling waters. CEO Ramon Laguarta and his team are aiming to increase earnings at an 8% rate this year while sales rise by 4%.

PEP Operating Margin (TTM) Chart

PEP Operating Margin (TTM) data by YCharts

Meanwhile, you'll get plenty of direct cash returns by holding this dividend stock. In early February, Pepsi announced a 7% boost to its annual dividend payout, marking its 52nd consecutive hike. Few consumer-facing companies can claim anything approaching that half-century streak, and that's a testament to Pepsi's enduring competitive strengths.

The dividend increase, plus Pepsi's falling stock price, has pushed the yield up to about 3% from a low of 2.3% nearly a year ago. Pepsi's proven commitment to robust cash-sharing with shareholders indicates that dividends are likely to keep growing for the foreseeable future. 

The price is right

In addition to that immediate income, you'll get exposure to some potentially market-thumping capital appreciation with this stock. Pepsi shares are trading at about 10% above their 52-week lows, after all. The valuation is sitting at 2.6 times annual sales compared to the more than 3 times sales that investors were paying last May. Coca-Cola (KO), for context, is priced at nearly 6 times revenue.

Pepsi isn't as profitable as that rival beverage giant, but it has a good chance at lifting sales and operating profit margin for yet another year in 2024. It won't matter to the investing thesis whether that growth is a bit below what investors have seen in the past several years.

Combined with a rising dividend payment, these steady gains should help you see attractive returns from holding this strong, but currently unloved dividend stock. You should consider snapping PepsiCo shares up at today's discounted prices.