It took a lot longer than many had expected, but Southwest Airlines (LUV -0.84%) in December finally reached a deal with the union representing its pilots. Investors cheered the development, sending shares of Southwest up 12.9% for the month, according to data provided by S&P Global Market Intelligence.

The final deal gets done before year's end

It has been a turbulent few years for the airline industry. The pandemic all but destroyed demand for travel, but in the quarters since the vaccines were released, airlines have enjoyed strong demand and domestic pricing power.

But beneath the surface, the industry remained vulnerable. Airlines offered buyouts to workers during the pandemic to try to reduce costs and were left severely understaffed as demand returned. Heading into 2023, investors faced uncertainty about costs as inflation and oil prices took their toll and labor contracts came up for renegotiation at a time when demand for pilots was outstripping supply.

Delta Air Lines reached a new agreement with its pilot union in the spring, and American Airlines Group and United Airlines Holdings followed in the summer and fall. That left only Southwest among the major U.S. carriers and created a lot of questions for investors.

In mid-December, Southwest and its pilot union reached a tentative agreement on a new, five-year deal that includes 50% cumulative pay increases over the life of the contract. The deal, which requires pilot approval, would provide a 29.5% pay increase upon signing. It would bring the hourly rate of a 12-year plus captain to $368.47 by 2028.

Is Southwest a buy heading into 2024?

The new pilots deal means higher costs for Southwest, but that's better than continued uncertainty and the inability to plan due to not having a deal. With pilots across the industry all getting a step up in pay simultaneously, Southwest will be able to adapt to the new contract and figure out how to fly profitably.

The certainty is good because Southwest faces other challenges heading into the new year. Inflation and the potential for a slowing job market, coupled with a return of student loan payments, could crimp the consumer in the months ahead and lead to a slowdown in demand. And Southwest, once the plucky upstart, now faces pressure from discounters like Frontier Group Holdings and Allegiant Travel. This is a cyclical business that tends to ebb and flow with the economy, and Southwest is largely at the mercy of macroforces in the quarters to come.

Southwest has been a reliable long-term hold, but the stock appears to be fairly valued following its December surge. Investors would likely do better by shopping around rather than boarding Southwest today.