What happened

Airline shares have been red-hot through the first week of June, with some companies rocketing up more than 90% in the early days of the month. Gravity finally pushed back some on Tuesday, with the sector giving back a small part of those gains.

Shares of American Airlines Group (AAL -1.55%) traded down 10% as of 12:30 p.m. EDT, with shares of Delta Air Lines (DAL 0.58%), United Airlines Holdings (UAL 0.41%), Alaska Air Group (ALK -0.79%), JetBlue Airways (JBLU -19.24%), Spirit Airlines (SAVE -3.96%), and Hawaiian Holdings (HA -0.62%) all down 8% or more.

Southwest Airlines (LUV -0.59%) and Allegiant Travel (ALGT -0.43%) were the relative winners in the group, down between 4% and 6% each.

SAVE Chart

Airline data by YCharts

So what

The airlines have taken investors on a wild ride so far in 2020. The stocks lost about half of their value, or more, during the early days of the COVID-19 pandemic as global travel demand cratered. A rush of added liquidity, including government bailout funds, stabilized the sector, but investors have been anxiously watching for signs of a recovery.

An airplane landing at night.

Image source: Getty Images.

Those signs began to appear in late May and have continued into June with the Transportation Security Administration reporting daily gains in the number of travelers being screened and airlines announcing plans to rebuild their domestic schedules. That in turn led to a pronounced reaction from the shares, with American, for example, gaining 40% in a single trading session last week.

After a number of strong days, the broader markets switched to "risk-off" on Tuesday, and airlines followed. Though the news is encouraging for the sector, we are still well off the highs in terms of travel demand -- the TSA screening numbers, while improving, are still down 80% year over year -- and investors are likely taking some of their gains after a strong week.

Now what

With the focus now primarily on what is going right for the airlines, it is important to at least make mention of what could go wrong. Traffic, as mentioned, remains down year over year and will likely take years to recover to pre-pandemic levels.

Corporate and international traffic, typically the most lucrative for airlines, will likely be the last to come back. And although I am optimistic total global travel demand will continue to climb, the mix of leisure and business travel could forever be altered, which could impact the long-term profitability assumptions for some of the carriers.

There is also the lingering risk of a second wave of the pandemic, which could send demand crashing down yet again and rekindle questions about the airlines' abilities to survive.

I'm optimistic we are on an upswing, but given the risks that remain, investors should stick to small positions and focus on the top companies in the sector with the best chance of survival. Be prepared for the second half of 2020 to be as turbulent as the first half as been.