Everything now appears to be going right for Xiaomi Corp., the Chinese smartphone maker whose stock failed to gain traction following its 2018 initial public offering.

Shares rose 5.4% Friday, putting this month’s surge at what would be a record 52%. Xiaomi is at all-time highs while larger rival Huawei Technologies Co. deals with U.S. restrictions intended to crimp adoption of the company’s 5G wireless technology. This week’s second-quarter report showed Xiaomi’s premium phones are making inroads in China, helping profit more than double. And an electric vehicle maker that Xiaomi invested in soared 41% in its US debut on Thursday.

xiaomi

About 20 brokerages have raised their stock-price targets on Xiaomi in the wake of the second quarter’s report, according to data compiled by Bloomberg.

The market’s turnaround comes after Xiaomi was one of the few mainland technology giants whose shares persistently traded below its initial public offering price. From the high just days after its debut, Xiaomi’s stock fell 61% at 2019’s bottom amid US-China trade tensions and a global smartphone market slowdown ahead of the launch of 5G service. The company has been in a tough battle for market share with Huawei and smaller players Oppo and Vivo.

When founder Lei Jun went public in July 2018, he said he wanted first-day buyers to double their returns.

Morgan Stanley analysts wrote in a note last week that Huawei having to increasingly use third-party chips “will reduce its competitive advantage in phones and give Xiaomi an opportunity to gain share in China.” Xiaomi could increase market share from Huawei not just in China but also Europe and Latin America, said Citigroup Inc. analysts including Andre Lin on Thursday.