What happened

Shares of Uber Technologies (UBER -2.94%) gained 15%, according to data from S&P Global Market Intelligence, in the ridesharing giant's first full month as a publicly traded company.

Uber shares continued to be volatile, but some analyst endorsements, a not-so-bad earnings report at the end of May, and an improving macroeconomic situation helped pushed the stock higher during June -- even lifting it above its IPO price of $45.

A woman getting into an Uber vehicle

Image source: Uber.

The chart below shows how shares bounced up and down over the course of the month.

UBER Chart

UBER data by YCharts.

So what

Uber came into June riding momentum from its first-quarter earnings report as the numbers were good enough to give support to a stock that had been mostly hammered since its IPO on May 10. Investors also liked that CEO Dara Khosrowshahi indicated that he thought the price war between Uber and rival Lyft (LYFT -3.35%) was easing, a positive sign for both ride-hailing companies. 

Uber then got another shot in the arm when positive analyst ratings began coming in on June 4, and the stock rose 9% over June 4 and 5. Among the most optimistic analysts was BTIG, which slapped an $80 price target and a buy rating on the ridesharing service, arguing that autonomous vehicles would provide a significant tailwind for the company within five years. A number of other analysts cited the company's industry leadership and the emergence of the mobility economy as they called the stock a buy. According to Bloomberg, Uber had collected 21 buy ratings, five holds, and no sells. 

For the next few weeks, the stock traded within a narrow range before breaking out on the last two days of June, gaining 9% to reach an all-time closing high of $46.38 amid news that it plans to expand into Ivory Coast and Senegal, and to launch an Uber Boat service in Lagos, Nigeria, following a similar launch in Mumbai, India, a few months ago. That news again shined a light on the company's global ambition and its willingness to embrace all forms of transportation. 

Now what  

Uber has shed some of those gains in the first days of trading in July as a Stifel analyst said he favors Lyft over Uber, and gave Uber just a neutral rating. Plenty of risks remain for the company, including its massive losses and slowing growth, but the stock's story is just beginning. Investors can expect the volatility to continue.