There's always a bit of luck involved when it comes to investing. No one could have foreseen the pandemic back in 2019, but it has turned out to be a strong growth catalyst for a bunch of companies. As the virus spread across the world in early 2020, countries shut off their borders, air travel was curtailed, and movement restrictions were imposed.

As a result, many people shifted online to telecommute, stay in touch with loved ones, and transact as well. The surge in people going online led to a boom for technology, e-commerce, and cloud computing stocks. Revenue and net income soared for such businesses as demand exploded for smartphones, digital devices, and cloud software. Companies that provided such products and services rode the wave of digitalization, and many of them reported stellar earnings.

Their share prices have also climbed significantly in tandem with these improvements. Here are three stocks that have doubled in the past two years, but the question is whether they can repeat that performance moving forward. Let's find out.

A pair of hands wraps a holiday present.

Image source: Getty Images.

Etsy

E-commerce player Etsy (ETSY -1.27%) was a big beneficiary of the online shift. The company specializes in handcrafted, personalized gifts and has made a name for itself as a niche player within the e-commerce space. The past two years have seen Etsy's share price more than triple to about $163 currently, but it's sharply off its all-time high of close to $300.

It's clear that the e-commerce business has enjoyed a strong run. Revenue in the fourth quarter of 2019 stood at $270 million while gross merchandise sales (GMS) clocked in at $1.66 billion. Fast forward to the third quarter of 2021 and revenue nearly doubled to $532.4 million while GMS soared 88% to $3.1 billion. Net income has nearly tripled -- from $31 million to $90 million -- over the same period. GMS per active buyer has also been climbing steadily over the past year from $110 in Q3 2020 to $132 in the latest quarter. 

It's looking increasingly clear that Etsy's growth still has legs. Its robust strategy emphasizes an easy-to-use and intuitive search interface that thrives on human connections. The company also has a special selling point with its assortment of unique items. In the past year, Etsy has also greatly increased its selection of offerings by acquiring Depop and Elo7. Depop is a global fashion resale marketplace that allows Etsy to tap into a younger user base (mostly below the age of 26) while Elo7 is a top 10 e-commerce site in Brazil that's well-known for its unique, handmade items.

With a strong portfolio of products on its site and a unique selling proposition, Etsy looks determined to continue its blistering growth.

Apple

The world's most valuable technology company, Apple (AAPL -0.81%), needs no further introduction. The maker of the iPhone and iPad saw a surge in sales for its devices and services as more people went online to communicate, work, and interact. This phenomenon, coupled with its strong brand name, has seen the company's share price more than double from $80 in early 2020 to $173 at present.

In fiscal 2019, the company's sales stood at $260.2 billion while net income was $55.3 billion. Two years later, net sales have jumped by 41% to $365.8 billion while net income has surged by 71% to $94.7 billion. Of note, services revenue increased by 47.8% over this period from $46.3 billion to $68.4 billion, underscoring the increasing importance of this division as a contribution to Apple's overall revenue. The gross profit margin also improved from 37.8% to 41.7% as services brought in higher margins than products. 

The company continues to innovate and monetize new technologies such as augmented reality (AR) and virtual reality (VR). Apple is now rumored to be releasing a high-end headset that mixes both AR and VR and could be a game changer as it prepares itself for a new wave of interest in the metaverse.

There are also the new iterations of its wildly popular iPhone, iPad, and Mac computer products that should continue to see strong demand from Apple's legion of fans. With new streams of revenue opening up and a strong brand name, Apple is firmly on the path to higher profitability as time goes by.

Tractor Supply Company

While the pandemic raged on, many people started to refocus on their homes and farms again, leading to strong business performance for Tractor Supply Company (TSCO 1.04%). The largest rural lifestyle retailer in the U.S. has benefited from this renewed interest in homes and pets -- and its stock has more than doubled from $93 two years ago to its current $222.

Tractor Supply's strong financial performance in the past two years justifies this rise. For the first nine months of 2019, the company reported revenue of $6.2 billion and net income of $418 million. Two years later, revenue for the first nine months had climbed 53% to $9.4 billion while net income had surged 85% to $776 million. In addition, the dividend per share increased from $1.01 to $1.56 over the same period.

The momentum looks set to continue with the company emphasizing its "Life Out Here" strategy to increase loyalty and attract more customers. Its Neighbor's Club loyalty program has more than 22 million members and is still growing. Tractor Supply is also active in acquisitions. Early last year, it purchased Orscheln Farm and Home, a farm and ranch retailer, for $297 million -- adding 167 stores to its network.

The company has also forged a partnership with Porter-Cable, a portable power tool brand, to be the exclusive retailer for its line of power tools, and it has also collaborated with Professional Bull Riders on a multi-channel marketing plan. With these business initiatives and the tailwinds from the pandemic still lingering, Tractor Supply should continue to enjoy steady growth moving forward.