GoPro shares surged, more than doubling their initial public offering price in less than a week on optimism that the wearable-camera maker's sales and profit may outperform projections in the coming quarters.

The stock close up 20.6 percent to $48.90 in Tuesday's Nasdaq trading. GoPro shares debuted at $24, the high end of a marketed range on June 25. The company's market value is now about $5.8 billion, compared with $2.96 billion in its IPO.

GoPro last year sold 3.8 million of its waterproof cameras that shoot from a first-person viewpoint, letting skiers, surfers and sky divers record activities and share them online. Investors who couldn't get stock in the initial sale may be snapping up the shares now, betting GoPro's revenue and profit will rise as it makes money from advertising and partnerships, said Charlie Anderson, an analyst at Dougherty & Co.

"You'd be hard-pressed to find another IPO that's had a four-day run like this one right out of the gate," said Minneapolis-based Anderson, who recommends buying the stock. He said the company's results may exceed predictions in the coming quarters, and estimated GoPro stock is trading at about five times estimated sales, compared with a price-to-sales ratio of 1 to 3 for traditional device makers.

"If you priced it higher, you'd feel like you were really stretching the valuation," he said.

GoPro cameras have attracted a younger, social-media-driven generation who want the product used by famous athletes, such as snowboarder Shaun White. Last year, customers uploaded almost 3 years of footage taken using the devices, and the user-generated content is distributed through Facebook, Instagram and Twitte. On Google's YouTube alone, there have been more than 500 million views of GoPro videos.

In filings related to the IPO, the San Mateo-based company said it planned expand its media business and expects to generate advertising and sponsorship fees starting in the second quarter. It has partnerships with Microsoft's Xbox Live and channels on YouTube and Virgin America.