PepsiCo's (PEP -0.41%) stock popped 4% on Oct. 12, after the company released its third-quarter earnings report. The beverage and packaged-food maker's revenue rose 9% year over year to $21.97 billion, beating analysts' estimates by $1.15 billion, as its organic sales increased 16%. Its core earnings, which are pegged to its organic sales, grew 14% on a constant currency basis to $1.97 per share -- which also cleared the consensus forecast by $0.12.

PepsiCo expects its organic sales to rise 12% for the full year, compared with its previous forecast for 10% growth. It expects its core EPS to increase 10% on a constant currency basis, compared with its prior target of 8% growth.

A glass of cola in a diner.

Image source: Getty Images.

Those numbers indicate PepsiCo is well insulated from inflation and other macro headwinds. That's why PepsiCo's stock has risen 8% over the past 12 months as the S&P 500 has declined 17%. But is it still the right time to buy shares of PepsiCo?

An evergreen business model

PepsiCo is frequently compared to Coca-Cola (NYSE: KO). To counter declining soda consumption rates across the world, both companies expanded their beverage portfolios beyond their flagship sodas with additional brands of bottled water, teas, juices, sports drinks, and other non-carbonated drinks. They also refreshed their carbonated drinks with new flavors, healthier versions, and smaller serving sizes to attract new customers.

But unlike Coca-Cola, which sells only beverages, PepsiCo also sells packaged foods through its Frito-Lay, Quaker, and Pioneer Foods subsidiaries. That diversification makes it more comparable to diversified beverage and food makers such as Mondelez (NASDAQ: MDLZ).

PepsiCo's products are consumed more than a billion times daily across more than 200 countries and territories. That scale and geographic diversification have enabled it to withstand plenty of economic downturns since its public debut in 1919. Between 2001 and 2021, PepsiCo's annual revenue expanded at a compound annual growth rate (CAGR) of 12%, while its operating margin rose from 8% to 14%. The stock has generated a total return of more than 500% over the past 20 years, compared with the S&P 500's total return of less than 400%, and the company has repurchased more than a fifth of its own shares.

Just like Coca-Cola, PepsiCo is a Dividend King that has raised its annual dividend for at least five straight decades. Its estimated core EPS of $6.73 this year can also easily cover its forward annual dividend of $4.60 per share.

Solid growth over the past five years

Over the past five years, a host of troubles -- from trade wars and tariffs to the pandemic, supply chain issues, and rampant inflation -- have disrupted many sectors. But none of those challenges prevented PepsiCo from consistently growing its organic sales and core earnings per share (EPS) year after year:

Metric

FY 2022*

FY 2021

FY 2020

FY 2019

FY 2018

Organic sales growth

12%

9.5%

4.3%

4.5%

3.7%

Core EPS growth**

10%

12%

2%

1%

9%

Data source: PepsiCo. *Company's outlook. **Constant currency basis.

During PepsiCo's third-quarter conference call, CEO Ramon Laguarta said the retail environment was still "very inflationary with a lot of supply chain challenges," but that it was stretching its brands to "higher price points and consumers are following us."

PepsiCo believes it can continue to offset the inflationary headwinds with more price increases, and its guidance for the full year reflects that confidence. CFO Hugh Johnston also said that consumer spending was "still very healthy in terms of our particular categories," especially compared with other markets, such as "housing and other big-ticket purchases."

A decent yield and a reasonable valuation

PepsiCo currently pays a forward dividend yield of 2.8%, which is a bit lower than Coca-Cola's 3.2% yield but higher than Mondelez's 2.7% payout. All three dividends beat the S&P 500's average yield of 1.8%, but they fall short of the 10-year Treasury's yield of 3.9% -- which could limit their appeal to conservative income investors as interest rates continue to rise.

PepsiCo's stock isn't cheap relative to its industry peers or its long-term growth rates. It trades at 23 times forward earnings, while Coca-Cola and Mondelez have forward multiples of 21 and 18, respectively. That higher valuation reflects its popularity as a safe-haven stock over the past year, but it could also limit its near-term gains over the next few quarters.

PepsiCo is the right stock for investors who want a blue-chip stalwart that can hold steady and generate stable income throughout the rest of the bear market. It's not the right stock for growth-oriented investors who expect bigger gains. I think PepsiCo is still a rock-solid investment now, since this is definitely a market that favors big and boring stocks over small and speculative plays.