What happened

Shares of United Airlines Holdings (NASDAQ:UAL) gained 12.7% in June, according to data provided by S&P Global Market Intelligence, aided by an analyst upgrade early in the month and the unexpected fare boost that followed. It's been a turbulent year for the airline, but United enjoyed a solid tailwind in June.

So what

United on June 6 was upgraded to buy from neutral by Goldman Sachs, with analyst Catherine O'Brien in a note saying that the market is adequately pricing in the risk factors that surround United shares. Analysts have appropriately incorporated challenging second-half comparables into United estimates, O'Brien said, making the airline less vulnerable to downside surprises.

A United 737 taxing at an airport.

A United 737 taxing. Image source: United Airlines.

She also sees catalysts on the horizon, including the airline negotiating a new contract with credit card partner JP Morgan Chase that is likely to have more favorable terms for United.

Shares of United also got a boost midmonth after the industry enacted a round of domestic fare increases, helping to ease concern about demand. While airlines are forbidden from colluding on pricing, they do monitor one another's fare structure closely and try to match rates. For this reason an attempt by one airline to raise fares often succeeds or fails based on whether competitors choose to match the price.

Now what

It's been a turbulent year for shares of United, rocked between uncertainty surrounding global demand and a still-resilient U.S. consumer as well as being caught up in fluctuations in oil prices.

UAL Chart

UAL data by YCharts

The airline is in the early stages of a three-year plan calling for aggressive growth, which offers significant opportunities for United but also risk if it is expanding into a possible U.S. downturn. The early results of the plan are positive, but the story will take time to fully play out.

In the near term United is likely to continue to trade based on investor expectations for economic growth and the health of the U.S. economy.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.