JD.com (JD -2.14%) has been one of the worst-performing stocks on the market over the last three years, but in recent weeks, the Chinese e-commerce stock has shown signs of a potential turnaround.

JD got a bump after its first-quarter earnings report last week as the company beat estimates, posting accelerating revenue growth and increasing profits.

Wall Street analysts took notice of the report as well, and one thinks JD is a buy on the news.

A woman typing on a laptop in front of the Hong Kong skyline.

Image source: Getty Images.

Macquarie upgrades JD.com to outperform

Macquarie raised its rating from neutral to outperform on the news and lifted its price target on the stock from $26 to $40, noting that the worst is behind JD in its transition as the company has made efforts to be more competitive on price with rivals like PDD Holdings' Pinduoduo.

The company also has an advantage with its logistics network, which was its fastest-growing category in the quarter with revenue up 15% in JD Logistics. JD also posted growth in both of its retail categories, electronics and home appliances and general merchandise.

Is JD.com stock a buy?

Shares of the Chinese e-commerce stock fell more than 80% from its peak in early 2021 to its trough earlier this year, and the stock has started to rally off that point.

However, JD.com still seems diminished, and 7% revenue growth is well below its previous pace. Additionally, the Chinese economy is still facing a lot of uncertainty as consumer demand has been weak and U.S. export restrictions threaten to disrupt the Chinese tech sector.

At this point, one quarter doesn't seem like enough to make it clear that the business is recovering. While the worst may be behind the company, JD will need to continue accelerating revenue growth to drive the stock higher from here.