The COVID-19 pandemic crushed many stocks over the past few months, but a trio of resilient e-commerce stocks -- Shopify (SHOP 4.90%), Amazon (AMZN 1.30%), and JD.com (JD 2.08%) -- seemed immune to that sell-off. Shopify's stock rose nearly 50% this year, while shares of Amazon and JD advanced more than 20%.

Let's see if these three stocks are still worth buying.

1. Shopify

Shopify's e-commerce tools -- which include digital storefronts, marketing tools, payment tools, and other services -- help merchants digitize their offline businesses. Demand for those services spiked over the past few years and Shopify's revenue soared 59% in 2018 and another 47% in 2019.

Tiny parcels on a laptop keyboard.

Image source: Getty Images.

Shopify initially spooked the bulls by pulling its full-year guidance at the beginning of April in light of the pandemic. But in mid-April, Shopify CTO Jean-Michel Lemieux claimed the platform was "handling Black Friday level traffic every day" as the pandemic forced more brick-and-mortar businesses to ramp up their online capabilities. That statement, which suggested Shopify could easily surpass analysts' prior forecasts for 25% sales growth this year, sparked a rally that sent Shopify's stock to an all-time high.

However, Shopify's adjusted net income also fell 22% last year, due to ecosystem investments and its acquisition of warehouse robotics provider 6 River Systems, and analysts had expected another double-digit decline in 2020.

Shopify's core business looks stable, but its stock trades at over 25 times and 1,000 times next year's revenue and earnings estimates, respectively. Those valuations indicate Shopify is trading like a cult stock -- so investors should wait for a big pullback before accumulating some shares.

2. Amazon

The COVID-19 crisis also lit a fire under Amazon's core e-commerce and cloud infrastructure platforms. Amazon's orders spiked as more consumers complied with stay-at-home directives, while the usage of Amazon Web Services (AWS) surged as people worked from home and accessed more cloud-based apps, services, and streaming media platforms.

Parcels in a warehouse.

Image source: Getty Images.

Amazon generates most of its revenue from its online marketplaces, but it earns most of its profits from AWS's higher-margin services. This resilient business model allows Amazon to undercut smaller retailers with loss-leading strategies. It also locks shoppers into its Prime ecosystem, which recently surpassed 150 million members.

Even as other retailers lay off or furlough their employees, Amazon recently hired 100,000 workers for its distribution centers and plans to hire another 75,000 to fulfill its incoming orders. If other brick-and-mortar retailers fail to recover after the crisis ends, Amazon will likely absorb a large percentage of their shoppers.

In short, the crisis is generating tailwinds instead of headwinds for Amazon, so it could easily beat Wall Street's expectations for 20% revenue growth and 23% earnings growth this year. Amazon's stock isn't cheap at more than 80 times forward earnings and nearly four times next year's revenue, but it's more reasonably priced than Shopify.

3. JD.com

JD is China's largest direct retailer and its second-largest e-commerce company after Alibaba (BABA 2.59%). Unlike Alibaba, which doesn't take on inventories at its core marketplaces, JD holds inventories and fulfills orders with its own logistics network.

JD's approach is more capital-intensive than Alibaba's low-cost approach, but it enables it to maintain tighter quality control. JD's revenue rose 25% last year, and its adjusted net income rose 8% -- defying the bearish notion that it couldn't generate sustainable profits. JD generated those profits by increasing the scale of its platform, controlling its expenses, and offering JD Logistics as a service to other retailers.

JD also widened its moat against Alibaba and its low-cost rival Pinduoduo (PDD 3.13%) by expanding into lower-tier cities. Its number of active customers rose 19% annually to 362 million last quarter, and 70% of those new shoppers came from Pinduoduo's base of lower-tier cities.

It also expects its sales in the first quarter, which bore the full brunt of lockdowns across China, to rise "at least" 10% annually. China has since ended those lockdowns, which indicates JD's growth could easily top that forecast and accelerate in the second quarter. Analysts expect JD's revenue and earnings to rise 18% and 16%, respectively, this year, and its stock looks reasonably valued at about 40 times forward earnings and less than one times next year's revenue.

The bottom line

Shopify, Amazon, and JD all boast unique strengths, and they could all remain resilient in this tough market. However, Amazon and JD are arguably better investments at these prices, since they're more realistically valued relative to their growth. Shopify's rally is clearly a technical one, and it could fade quickly once the fundamentals kick in -- so investors shouldn't chase that rally.