What happened

The airlines mostly avoided the nightmare cancellation scenario over the holiday weekend, but investors are in no mood to celebrate. Shares of United Airlines Holdings (UAL 17.45%), Delta Air Lines (DAL 2.86%), Southwest Airlines (LUV 2.60%), and JetBlue Airways (JBLU 4.59%) all traded down as much as 5% on a tough day for broader markets.

So what

Heading into the July 4 weekend, airlines and their investors were bracing for the worst. The industry is grappling with a shortage of pilots that's causing issues with scheduling. The fear was that any mechanical issues or bad weather on such a busy travel weekend would lead to thousands of cancellations.

The airlines had proactively trimmed their schedules in hopes of avoiding the worst. While there were some flight disruptions over the weekend, it was mostly Air Canada making headlines on Tuesday morning due to poor performance. The U.S. carriers significantly reworked their schedules heading into the weekend, so they probably left some revenue on the table but appear to have survived without a systemwide meltdown.

But for airline investors, the focus is more on what lies ahead rather than what we just got through. The stocks were under pressure, along with the broader market, due to growing concerns we're flying toward a recession.

The issue continues to be inflation and the steps that the Federal Reserve will take to tamp down rising prices. There's risk for airlines, regardless of the outcome of the Fed's efforts. Higher prices for items like food and gas leaves less money to spend on vacations. And if we end up in a recession, it will likely impact demand for both leisure and business travel.

Delta and United are likely also coming under pressure due to reports of potential new pandemic-related restrictions on parts of China, a reminder that international business is unlikely to rebound any time soon. JetBlue and Southwest, meanwhile, are closely tied to the U.S. consumer and can ill afford a falloff of household spending power.

Now what

The conventional wisdom right now is that inflation will have some impact on demand. The question is how much of an impact. To some extent, the answer is unknowable because we don't yet know if the economy will fall into a deep recession. But investors are assuming the worst.

In the coming weeks, all of these airlines will announce second-quarter results, and management teams will likely provide commentary on how demand is holding up post Labor Day. The commentary could either justify investor fears or offer some reassurance. However, it's nearly as hard for executives to forecast future demand in a rapidly changing environment as it is for investors to try to gauge the health of the consumer.

The one thing that seems certain is we'll have to deal with some amount of uncertainty for the foreseeable future. For those who understand the risk and see airlines as an attractive long-term investment, Delta is the top choice of this group, due to its strong global offering and top-tier management team. But given the difficult environment we're in, there's no reason for investors to rush to buy these stocks right now.