Chinese e-commerce giant leapt nearly six percent on its Hong Kong debut Thursday, after raising almost $4 billion in an initial public offering that was the world's second biggest this year.

The firm, which listed on the Nasdaq in New York in 2014, opened at HK$239 in early morning trading in Hong Kong, compared with its listing price of HK$226.

The new debut comes as Chinese companies -- especially those in tech -- eschew Wall Street because of rising tensions between Washington and Beijing.

The crash of once-booming coffee chain Luckin Coffee Inc following an accounting scandal has also increased concerns among overseas investors about the transparency and reliability of some Chinese companies.

New York's loss has been Hong Kong's gain, however.

Fellow Chinese tech giant NetEase raised $2.7 billion in the city earlier this month, capping a frenetic few weeks on the stock exchange despite swirling fears over Beijing's plan to impose a national security law on the finance hub.

NetEase saw a similar six-percent gain on its first day of trading.

"We have come to Hong Kong not just because we want to share our promise and development with more clients... but because we have absolute confidence in China and the future of China's economy," JD's Retail Chief Executive Officer Xu Lei said at the opening ceremony. founder, chairman and CEO Richard Qiangdong Liu founder, chairman and CEO Richard Qiangdong Liu GETTY IMAGES NORTH AMERICA / Andrew Burton

The IPO is the second-largest globally this year after Beijing-Shanghai High Speed Railway raised $4.3 billion in January, according to Bloomberg News.

The dual listing will help the company better compete with e-commerce rivals including Amazon and Chinese titan Alibaba, which raised a whopping $12.9 billion in a secondary Hong Kong IPO last year.

Alibaba and JD dominate China's online shopping industry, which has struggled during the coronavirus pandemic.

A major test of Chinese consumer spending will end Thursday with both companies wrapping up a major online sales bonanza, the first since the coronavirus burst out of central China.

The annual "6.18" sale that runs for two weeks in June is the second biggest discount period for Chinese retailers after "Singles Day", which falls on November 11. Both are similar to "Black Friday" in the US or Boxing Day sales in the UK.

While Hong Kong remains an attractive destination for listing, the city is in the midst of a recession and swirling political unrest, with pro-democracy protests raging for much of the past year.

Beijing has dismissed public anger as a foreign plot and has announced plans to impose an anti-subversion law on Hong Kong, which has some businesses worried that the city may lose the autonomy from the mainland that has propelled its economic rise.

Beijing says the law will stabilise the city and reinforce confidence.