SAN FRANCISCO -- Facebook's stock is edging back into the black.
On Wednesday morning, the company's stock traded above $38 a share, the price at which Facebook, the world's leading social network, first sold shares to the public more than a year ago.
The catalyst for the rise was the company's surprisingly strong second-quarter earnings report last Wednesday, which quelled many investors' doubts about Facebook's ability to make money from its legions of mobile users, and suggested that the company's profit stream was growing.
Since last week's report, shares have risen about 34 percent. Early Wednesday, they touched $38.31 a share, although at midday, they were slightly below $38. They closed at $36.80 a share.
Facebook's shares hit a low of $17.55 last fall, but investors have warmed to the company since then. Facebook has shown signs that it can significantly expand its advertising base and keep its 1.2 billion users engaged, despite competition from rivals like Twitter and other social-sharing sites like Pinterest.
"Facebook was caught flat-footed by the shift to mobile," said Mark S. Mahaney, an analyst with RBC Capital Markets. "It took them four or five quarters to catch up."
Now, he said, "they appear to be set up as a sustainable high-growth business."
Mr. Mahaney, whose firm has a $40 price target on the Facebook stock, said that analysts across Wall Street had increased their projections of the company's financial performance. Analysts now expect Facebook to increase its profits 30 to 35 percent a year through 2015.
Because stocks tend to trade as a multiple of a company's future profits, those upgrades last week sent Facebook's stock soaring.
Still, there are reasons to be concerned. Mobile messaging platforms like Snapchat and WhatsApp are grabbing the attention of many of Facebook's younger users. Twitter is mounting a major effort to go after marketers, especially brands that typically advertise on television, as it prepares for its own likely public offering.
And Facebook risks turning off users with too many ads. Currently, about 1 in 20 items in the news feed, the main flow of items that a Facebook user sees, is an ads. During the company's quarterly conference call with analysts, Facebook's co-founder and chief executive, Mark Zuckerberg, said that users were beginning to notice the number of ads, suggesting that the company could not greatly increase their frequency without losing some users.
Although the company raised $16 billion from the initial public offering in May 2012, problems immediately followed.
The Nasdaq stock exchange botched the handling of buy and sell orders on the first day of trading. (A few months ago, regulators fined Nasdaq $10 million for the fiasco.) And in ensuing weeks, Facebook shares continued to fall. Many Wall Street investors questioned whether Facebook's stock was truly worth $38 a share at the time of the offering.
Particularly worrisome was Facebook's seemingly nonexistent mobile strategy at a time when Internet users were abandoning PCs for their smartphones. The company's smartphone and iPad applications were clunky, and it was generating no revenue from mobile ads.
Facebook's management, including Mr. Zuckerberg, recognized the problem and began a crash course to revamp the company's approach to mobile and better position the company for fast-growing emerging markets.
The company overhauled its apps, introduced ads into its users' news feeds, and created a new category of revenue called app-install ads. With the app-install ads, a game maker, for example, can promote its new game in Facebook's mobile software and give users an easy way to install the app with just a couple of clicks.
At the same time, Facebook introduced new advertising products meant to give marketers more ways to target specific groups of customers, which allowed the service to charge higher advertising rates.
While mobile advertising continues to grow, and was about 41 percent of Facebook's ad revenue in the second quarter, investors are also looking to new areas of potential profit growth. Those include video advertising in the news feed, which is expected to begin later this year, and the possible sale of ads in Instagram, the fast-growing photo and video-sharing app that Facebook bought in 2012.
"All of those seem like relatively large low-hanging fruit, and they are starting to go after them," Mr. Mahaney said.
This article originally appeared in The New York Times.