On its first day of trading at the Hong Kong Stock Exchange, shares of Chinese e-commerce giant JD.com surged by close to 6 percent before closing at around 3.5 percent higher than its initial listing price on Thursday. The homecoming secondary offering raised more than $4 billion, making it the second-largest share sale in the world this year.

Hours are its stocks were made available for trading, JD's shares hit a high of around HK$239 per share, 5.8 percent higher than its initial offer price. The stock closed at HK$234 for the day. Earlier in the month, the company had announced that it had raised around HK$30.5 billion after it issued 133 million new Class A ordinary shares in Hong Kong.

The initial offering was priced at HK$226 per share. JD and its bookrunners could exercise their overallotment option, which will potentially increase the deal size to about $4.3 billion. The option will result in the release of an additional 19.95 million new Class A ordinary shares. The option has to be exercised within 30 days after the company's IPO launch.

JD, which had listed its shares on the NASDAQ in 2014, is the latest Chinese company to execute its "homecoming" listing in Hong Kong. The last company to do so was Chinese tech giant NetEase, which managed to raise $2.7 billion through its secondary listing in the city.

The decision made by Chinese companies to list their shares locally comes as tensions between China and the United States continue to escalate. US-listed Chinese firms are facing increased scrutiny and regulatory pressure as the Trump administration attempts to clamp down on investors funneling money to China.

 In its preliminary prospectus, JD had stated that it is facing a potential risk of being delisted in the US following the proposal of a new bill by the US Congress. The legislation is threatening to delist foreign-owned companies from the country's equities markets if they do not provide open access to financial and audit reports.

In response to the US' continued hostility towards foreign listings, Hong Kong had made major reforms to its policies to encourage more US-listed Chinese firms to launch their secondary listings.

Based on JD's performance and other US-listed companies before it, including Alibaba, analysts have pointed out that investors have largely not been affected by the spat between the two nations. Demand from US investors has apparently remained unchanged and this held true for JD's listing, which was reportedly heavily oversubscribed. In Hong Kong, JD's retail offering was reportedly 179 times oversubscribed, highlighting the continued robust demand for tech stocks in China.