Investing in McCormick (MKC 0.21%) 15 years ago would have been a smart move. The spice and flavorings giant has trounced the S&P 500 over that time by gaining more than 350%.

Those returns were powered by the combination of rising organic sales, plus a few bold acquisitions like the French's and Frank's lines of condiments and sauces.

While the stock's more recent returns have been less appetizing, there's still a lot for investors to love about McCormick right now. Let's look at a few standout factors about this investment that aren't immediately clear from a casual glance at its annual report.

Profit pressures are temporary

McCormick's falling profit margins have been a major pressure on the stock price lately. This negative trend ran all the way through its most recent earnings report, with its gross profit margin declining by 4 percentage points in the fourth quarter, ending in late November. But smart investors understand that this earnings slump is likely temporary.

McCormick faced pandemic-related disruption in China in the fourth quarter. It is still working through major supply chain challenges, spiking costs, unfavorable exchange rates, and demand pressures tied to recent price increases.

Yet the company is still projecting a return to expanding operating margin in fiscal 2023. That forecast reflects its ability to consistently raise margins over time, notwithstanding the unusually weak period that shareholders have seen since mid-2022.

Demand is holding up

The company has had to boost prices in recent months to account for the rising cost of ingredients, transportation, and wages. Prices jumped 9% in the fourth quarter and were up 8% for the full year.

Those increases did convince some of its customers to scale back on their purchasing. Volume declined about 5% in 2022. Yet this figure was also impacted by temporary pressures like the company's divestment of its kitchen-basics brand and the exiting from some niche markets in India and all of Russia.

The core U.S. market grew at a solid pace in 2022, indicating lots of enthusiasm for McCormick's spices and flavorings. In their fourth-quarter announcement, executives credited consumers' rising demand for flavor. "We saw strength in consumption trends, particularly in the U.S.," CEO Lawrence Kurzius said.

The outlook

Management's late-January operating update contained falling profit margins and surprisingly weak sales results. But executives said these disappointments were tied to temporary challenges.

The company backed up those words by forecasting an imminent return to solid sales and earnings trends. Revenue should rise by 5% to 7%, it said, as operating income expands by between 10% and 12%.

Bears might look at that forecast and say that it is overly optimistic given the prospect of slowing economic growth and more pressure on shoppers' budgets. But McCormick has sailed through many similar selling environments. Just look at its dividend payment, which has risen in each of the last 37 years.

Smart investors know that a streak like that is evidence of excellent investment factors, including strong capital allocation, market leadership, and pricing power. These elements should support further market-beating returns for owners of the stock over the next 15-year period.