JD.com (JD -2.14%) is one of the biggest e-commerce companies in China and, based on direct sales, the biggest retailer in China. The company competes closely with Alibaba, which operates based on a marketplace model, and PDD Holdings, an upstart discount online retailer.

While JD.com has grown rapidly throughout most of its history, more recently, the company struggled with intensifying price competition with Alibaba and PDD's Pinduoduo, weak consumer demand in China following the COVID-19 lockdowns, and a regulatory crackdown in China on the sector, which weighed on JD.com and its peers.

In the first quarter, revenue rose 7% year over year, its best performance in two years and a sign that more aggressive discounts may be helping the company win back market share. Despite the e-commerce price wars, JD.com grew adjusted operating income roughly 9% year over year to $1.2 billion in the quarter.

How JD.com has performed over the last five years

In recent weeks, JD.com has rebounded off its recent lows following better-than-expected results in its first-quarter earnings report. The chart below shows how JD.com has performed over the last five years based on an initial $10,000 investment. As you can see, the stock soared before falling sharply as the pandemic boom gave way to the more recent struggles.

JD Total Return Level Chart

Data by YCharts.

The chart shows that a $10,000 investment in JD.com stock five years ago would now be worth $12,380, including dividends reinvested. That would significantly underperform the S&P 500, which has more than doubled in that time.

JD.com could continue its recovery, but the challenges facing Chinese e-commerce companies remain. While the stock looks cheap at a price-to-earnings ratio of 16, there's a lot of uncertainty facing the company in China.