What happened

Shake Shack (SHAK 0.33%) trailed the market last month as the stock lost 16% compared to a 2% increase in the S&P 500, according to S&P Global Market Intelligence. The decrease only erased part of investors' recent positive returns, though, and shares are still outpacing the broader market's 22% increase so far in 2019.

A man bites into a burger.

Image source: Getty Images.

So what

October's slump seemed to be driven by profit-taking from investors after shares had more than doubled since the start of the year. That quick rally raised fears that the company might have trouble meeting high expectations when it posted its third-quarter earnings results in early November. In fact, Shake Shack did surprise investors by announcing sluggish Q3 sales and worsening profitability heading into the year's final quarter.

Now what

CEO Randy Garutti and his executive team still expect to post strong sales growth this year, mainly thanks to a quickly growing base of restaurants. Gains will be pressured by the switch to a single delivery provider, though, and that headwind will last into 2020, management said. The bigger concern for investors is that costs are rising throughout Shake Shack's operations, and that's leading to significantly lower operating margins.

While some of these issues are temporary, they add up to extra risk around the chain's long-term earnings profile. That shift was enough to add volatility to the stock in October, and might contribute to similar swings in the months ahead.