It was a roller-coaster ride of sorts for ride-hailing service Lyft Inc. on Wednesday.

Shares initially spiked as much as 11% in after-hours trading following a surge in sales and a forecast for stronger annual revenue, but the gains quickly cooled after the company said insiders would be able to sell their shares earlier than expected. Reversing course once again, shares rebounded from a momentary dip in the extended session to rise again after Lyft executives revealed its price war with Uber Technologies Inc. was easing and that losses this year will be less than in 2018. The stock was up 6.8% in premarket trade Thursday.

Lyft LYFT, +2.83% reported record quarterly revenue of $867.3 million, up 72% from the same quarter a year ago, easily outpacing analysts’ average forecast of $809 million. The San Francisco-based company hiked its full-year revenue guidance to between $3.47 billion and $3.5 billion, from $3.275 billion to $3.3 billion.

The second-quarter results also initially lifted shares for rival and market leader Uber UBER, +3.32% , which increased 5% in the extended session as Lyft was spiking. Both stocks, which have struggled to hit their IPO prices since going public in the spring, quickly calmed down: Lyft was recently up 5% in after-hours trading while Uber — which reports its second-quarter results on Thursday afternoon — was up about 4%.

Lyft also disclosed in a filing with the Securities and Exchange Commission that the lock-up period — in which insiders are barred from selling shares after an initial public offering — would end more than a month earlier than expected. Lyft said that due to blackout periods and their agreement with underwriting banks, the lock-up period will now end as of the start of trading on Aug. 19 instead of Sept. 24. Lyft said that about 257.6 million shares will be eligible for trading after the lock-up ends.

For the quarter, Lyft reported 21.8 million active riders who generated on average $39.77 each, up from $37.86 in the previous quarter. FactSet had forecast 20.9 million active riders contributing $38 apiece, respectively. Lyft and Uber suggested in their first earnings reports after their IPOs that a pricing war between the two was coming to an end, which could boost revenue and margins for both.

Lyft Chief Executive Logan Green, in a conference call with analysts, said the revenue growth underscores a “secular shift from car ownership to transportation as a service.” He said 35% of Lyft drivers do not own a car.

Green added Lyft is launching a previously disclosed public partnership with Alphabet Inc.’s GOOGL, +1.13% GOOG, +1.16% Waymo division in the current quarter to bring self-driving car service to customers in the Phoenix area. About 10 vehicles with safety drivers should be in place by the end of the third quarter, he said.

Opinion: Uber and Lyft IPOs mean the cheap rides are coming to an end

Still, concerns over long-term profitability continue to swirl around Lyft, which reported a $644.2 million loss, or $2.23 a share, one quarter after it lost $1.14 billion largely because of IPO-related costs. Analysts polled by FactSet expected a loss of $1.15 a share.

Lyft and Uber seem to be targeting a better bottom line in their early days as public companies, while continuing to boost revenue quickly. Lyft on Wednesday improved its forecast for adjusted losses, predicting a loss of between $850 million and $875 million in 2019 — a $300 million improvement from an earlier forecast, and less than its 2018 loss of $911 million.

“There is tremendous pressure to make progress financially,” says Micah Rowland, chief operating officer at Fountain, a hiring-software startup that works with gig-economy companies. “That means more cost-cutting, as Uber did with the elimination of 400 jobs in marketing, and fare prices are bound to go up in this duopoly.”

“Lyft is leaner than Uber, so there is less to cut,” Rowland told MarketWatch, noting that Lyft employs about 5,000 people to Uber’s 22,000, and dabbles in fewer R&D-intensive fields, like food delivery.

From last quarter: Lyft stops providing key data after IPO, then insults investors’ intelligence

Feeding the anxiety has been an exodus of executives from the San Francisco-based company this year. Jon McNeill is leaving Lyft after 18 months as chief operating officer, and Chief Marketing Officer Joy Howard exited after only eight months. Compounding matters, California is considering a new law that would force Lyft, Uber, and other ride-sharing companies to treat drivers as employees instead of contractors.

At the same time, new research commissioned by Uber and Lyft concludes they are contributing to traffic congestion in major cities like San Francisco, Boston, and Washington, D.C., rather than freeing up roads as they initially promised.