Investors believe the restaurant and food retail industry is in-store for prolonged growth, so long as companies continue to keep up the changes they made because of the pandemic.

McDonald’s (MCD) and Yum! Brands (YUM) have, until recently, kept pace with the rapid increase of the S&P 500. New York based Shake Shack (SHAK) has had less success, underperforming far below the index, which saw a dip alongside the three companies, in May of this year.

Stocks in the retail and food service industry are making modest gains, while others are lagging behind

Yum! Brands, which owns and operates Pizza Hut, Taco Bell and KFC, is leading the pack, up over 16% to $126 a share, since its low point in May of this year. McDonald’s is also up over 9% to $243, while smaller fast-food chain Shake Shack, trails far below at -33% to $82 a share. The S&P 500 lands just under 12% in the six-month timeframe.

Analysts expect the gains to continue for the rest of the year as consumers ramp up their spending for the holidays. Among some industries, like foodservice and retail, the recovery has improved at a faster rate than expected, particularly in western countries with developed markets and higher vaccination rates, according to investors. 

“What we saw last year was that consumers tended to shrink their decision sets,” said Sean Dunlop, equity analyst at Morningstar Research Services LLC. “Instead of considering 15 to 20 companies, people had to choose from five to 10 trusting brands that had a robust digital capacity like delivery, and those tended to be the bigger companies going into the pandemic.”

Household names in fast food that have survived the pandemic, have done so by incorporating a number of strategies. For the golden arch franchise this has meant updates to their marketing tactics. In an effort to revamp the company’s image as a conscious brand, McDonald’s announced it would move towards more environmentally friendly toys and packaging, with the goal to do this for every location in four years.  

Core menu development, the company’s second strategy, takes a look at customer purchases and credit card data. The strategy is used as a way to develop items customers are likely to purchase more frequently. This year, McDonald’s increased their chicken sandwich production, as did Shake Shack, in an effort to keep up with competitors and the chicken-sandwich frenzy.  

The pandemic has meant focusing more heavily on a third, three-part strategy: digital, delivery and drive-thru. In the U.S, 95% of McDonald’s provide drive-thru service, accounting so far for $8 billion in sales during the first six months of this year. This means that the franchise could stay in business because of their drive-thru service, even if their dining rooms were to close again.  

Bigger companies as a result, have also been able to raise their minimum wage to $15 an hour. A move that Dunlop says is less of a strain on big purchasing conglomerates like McDonald’s and Yum! Brand companies, in part because, “they can keep prices low and make a difference on volume sales.” 

Companies like Shake Shack have always paid more than the minimum wage, despite their smaller footprint in the world. The company was under pressure to reach customers, but benefitted from delivery, Dunlop explains, which the company began to roll out this year. Its depressed stock performance has been led by a labor shortage, which the company is aiming to fix with a $10 million investment in onboarding strategies. The restaurant chain is also planning to raise the price of menu items in the following months, with the goal to offset inflation costs.

“As we look out from here, it’s going to be more challenging,” says Edward Lewis, an equity analyst covering U.S. consumer names at Atlantic Equities. “Seeing a snap back in casual dining means McDonald’s is now competing against other corporations.”

Analysts and individual investors expect to see an increase in fast food stocks, citing a strong rebound for casual dining and an increase in applicants in states that ended federal unemployment benefits, according to an earnings report.  

The declining labor shortage has led 26-year-old investor Juan Carlos Palacios, a mechanical engineer at Lockheed Martin Space, to consider investing in restaurant stocks in the future.

“Right now, looking at the labor shortage and increment of employees returning to the office, I can see the opportunity to invest,” Palacios said. 

Palacios considers himself a millennial investor. He does most of his personal trading through TD Ameritrade and most recently, has kept his eye on companies like Beyond Meat (BYND), because they appeal to a younger crowd. 

In February, the plant-based substitute company announced a three-year partnership with McDonald’s, in an effort to add plant-based products to their menus. 

Palacios says their simple supply chain and robust rewards program is something that is appealing to him as a data driven investor. McDonald’s reported having over 22 million active users on their app, with over 12 million joining their loyalty program. 

“I think the world is only going to see more McDonald’s, KFC’s, Pizza Huts and Taco Bells,” said Lewis.

Yum! Brands increased overseas sales by more than 20%. The biggest growth opportunity for franchises like McDonald’s however, are in European markets, which make-up an estimated 60% of their global profit. 

“We see McDonald’s leadership position in these areas as a key advantage that will help the brand to recover quickly after government mandates are lifted,” Eric Gonzalez, equity research analyst at KeyBanc Capital Markets, said in an earnings report. 

Alongside McDonald’s and Yum! Brands companies, Shake Shack is ramping up their physical and digital efforts as well, and has plans to open 10 new locations by the new year. 

These popular food franchises are likely to continue growing and developing innovative strategies, but if pandemic-led concerns, input costs, industry competition and a shortage of workers persist, stocks in the restaurant and food industry could continue to lag into the fourth quarter.