What happened

Airline shares are flying high on Wednesday morning, reacting to a Tuesday night push by President Donald Trump to provide a second round of assistance to the struggling industry. That's a much different message from what Trump had said earlier in the day, and it's a reason for investors to get excited.

JetBlue Airways (JBLU 1.05%) led the sector higher on Wednesday, up 8% as of 9:45 a.m. EDT, while United Airlines Holdings (UAL -1.25%) climbed 5.8%; Spirit Airlines (SAVE) was up 4.3%; and Alaska Air Group (ALK -1.32%), Delta Air Lines (DAL 0.08%), and American Airlines Group (AAL -1.77%) were all up more than 3% apiece.

A plane soars above the clouds.

Image source: Getty Images.

So what

It's been a rough year for the airlines. The COVID-19 pandemic has caused demand for travel to evaporate, pushing the entire industry into the red. The companies have survived thanks in part to $50 billion in aid provided as part of the CARES Act, but with traffic still not returning, the industry is going to shrink significantly in the months to come.

Despite the falloff in revenue, the airlines were able to keep their payroll intact thanks to funds in the CARES Act that went toward worker wages. In return for accepting the assistance, the companies agreed to do no layoffs through Sept. 30. But with that deadline now passed, tens of thousands of employees are facing furlough.

Lawmakers from both parties have pushed a new round of payroll assistance designed to put off furloughs for another six months, but the legislation has been bogged down as part of the broader fight in Washington over the size of a second stimulus bill. Trump called off negotiations Tuesday until after the election, causing stocks to drop.

Hours later, Trump in a late-night Tuesday tweet called on Congress to pass separate legislation providing $25 billion in payroll support for the airlines. He said the program can be funded via money allocated but so far unused as part of the CARES Act, promising that if Congress comes through with the assistance, he will sign immediately.

Some airline stocks are also benefiting from comments from J.P. Morgan's Jamie Baker, who updated his outlook for the industry in a research note out Wednesday morning. JetBlue received a double upgrade from underweight to overweight on the company's strong cost controls and low valuation, while United was moved from neutral to overweight and Spirit was moved from underweight to neutral.

Baker also raised his price targets for Alaska and Delta, but he downgraded Southwest Airlines (LUV -0.84%) despite its "ample liquidity" due to its relatively rich valuation.

Now what

Airline investors would be well advised to focus more on Baker's commentary than on the president's tweets. The legislation providing a second round of stimulus is important to airline workers, and it's supported by the airlines, but no carrier is at risk of a near-term bankruptcy filing should Washington not come through.

In fact, thanks to the initial CARES Act and efforts to raise about $50 billion in private funding, the airlines have relatively long runways and should be able to outlast the pandemic. The question is whether they will need to shed thousands of jobs to get there.

No matter what happens in Washington, airlines are unlikely to fully recover from this crisis until 2022 at the earliest. And when traffic does return to prepandemic levels, the industry will have billions in added debt on its balance sheets, which will stymie growth efforts for years to come.

I believe it is safe to invest in airlines but would advise trying to block out the day-to-day noise and focus on top companies like Delta and Southwest, which have the best balance sheets and operations that should perform well no matter what challenges come their way.