Alibaba Group Holding Ltd. .'s shares soared 38 percent in their first day of trading on Friday as investors jumped at the chance for a piece of what is likely to rank as the largest IPO in history, in a massive bet on China's burgeoning middle class.

It was an auspicious debut for the Chinese e-commerce company, which was founded by Jack Ma in his apartment in 1999 and now accounts for 80 percent of online sales in China.

About 100 people gathered outside the New York Stock Exchange at Wall and Broad streets, many of them Chinese tourists with cameras, and they cheered and snapped photos when Ma exited the building with the kung fu star Jet Li.