It's been a rough few months for JD.com Inc. (JD -4.13%) Shares of the Chinese e-commerce giant are down 40% from the peak they hit in June, due to a number of concerns. 

Broad skepticism about Chinese stocks as trade war simmers, disappointing second-quarter earnings, and most recently, the arrest of CEO Richard Liu in Minnesota on suspicion of rape -- and his release without charge 16 hours later -- have all contributed to the stock's sell-off. That incident with Liu alone wiped 16% off the stock in just two days.

Any time a long-time winner sells off, investors tend to wonder: is this a chance to buy?

An Asian woman holds a box and talks on the phone.

Image source: Getty Images.

The basics 

The fast-growing JD.com sits at the intersection of two huge growth opportunities: China and e-commerce. It posted revenue of $64.2 billion over its last four quarters, and in the most recent, revenue jumped 31.2% year over year to $18.5 billion. Adjusted net income for Q2 was $72.3 million or $0.05 a share.

Over the last four quarters, JD.com has posted earnings of $0.42 per share, giving it a P/E ratio of 62.6 at current trading levels. Based on 2019 EPS estimates of $0.88, the stock has a forward P/E of just 30, which looks especially cheap compared to its peers. Amazon (AMZN -0.46%)and most other e-commerce companies often trade at triple-digit P/E ratios.

JD.com also counts Google, Walmart, and Chinese mega-conglomerate Tencent among its investors, providing it has deep and powerful backing.

Profit concerns 

JD.com has missed earnings expectations three quarters in a row, which contributed to this year's sell-off. However, the company is in the midst of an aggressive investment cycle, which makes those weak earnings more forgivable, especially considering the opportunity ahead of it.

In many ways, JD.com resembles Amazon in 2014, when that company was going through its own ambitious investment phase and posting quarterly losses -- the last period during which it would do so. Since then, Amazon stock has risen sevenfold. 

In Q3 2017, JD added 21 million square feet of warehouse space -- about three-quarters of a square mile -- opening a new warehouse every two days. 

It has maintained that explosive pace since then, adding another 116 warehouses other the last three quarters. That massive infrastructure provides the company with serious competitive advantages, as the more warehouses it has, the faster it can make deliveries, and the costs of duplicating it present a considerable barrier to entry for would-be rivals.

The company is also advanced in automation, with a warehouse in Shanghai that can ship 200,000 orders a day but only employs four people, who maintain the robots that carry out the picking, packing and shipping. Such investments should pay off over the long haul.

A huge growth opportunity

It's clear why JD.com is opening hundreds of warehouses each year and investing in things like robotics and drone delivery -- it's chasing a huge growth opportunity. China is the world's biggest e-commerce market with estimated online sales of $1.1 trillion last year, and that figure is still growing fast. The broader Chinese economy is expanding at a rate of about 7% a year.  

The country's e-commerce sales grew 32% last year,  and rapid growth should continue as more Chinese enter the middle class and embrace online shopping. JD.com's expansion efforts should also help it attract new customers, and in fact, the company has steadily grabbed market share from its larger rival, Alibaba (BABA -2.70%). Its share of the business-to-consumer market rose from 18% in 2014 to 33% in 2017.   While Alibaba operates as a platform for third-party sellers, handling payments, JD.com controls all aspects of its online sales, including delivery, which should play to its advantage as it grows.

Finally, CEO Richard Liu also has aspirations for his company to enter the European and U.S. markets. Given its strengths -- and backing from the likes of Google and Walmart -- JD.com could present a real challenge to Amazon.

"Key man risk"

Liu's arrest over Labor Day weekend in Minnesota was something of a Black Swan event. He was detained by police for 16 hours, then freed and allowed to return to China. No charges have been filed, and authorities have not commented, but the investigation is ongoing. As such, the case still presents a risk -- especially in light of the tight grip Liu holds on the company.

The company is inexorably tied to its founder, so any developments in the case will swing the stock, but long-term JD.com is crafting a strategy that should set it up for success. Its heavy investments in future technology and access to huge growth markets have the company poised to benefit from industry tailwinds and shares are trading at bargain-basement prices.

The last time JD.com stock was this low, its revenue was half of what it is today.