Waiting for a stock to bottom out before picking up its shares at a discount -- a practice known as timing the market -- is almost impossible to pull off consistently. Investors would have to know precisely when shares of a company have reached rock bottom, and for anyone who can always know that in advance, a career in fortune telling might be more lucrative than investing in stocks. Another way to buy stocks at a discount is to wait for a market crash. 

After all, great companies will recover from a downturn, and those smart enough to hold their shares through thick and thin can be handsomely rewarded. If you don't have time to wait for the market to plunge, look for great stocks that have been under pressure of late, but whose businesses and long-term prospects remain intact. Two such companies are Vertex Pharmaceuticals (VRTX 0.78%) and Shopify (SHOP 1.73%)

Woman holding a cup and a phone standing in front of retail shop.

Image source: Getty Images.

1. Vertex Pharmaceuticals

Shares of biotech giant Vertex Pharmaceuticals are down a mere 3.9% over the past three months, compared to gains of 7.3% for the S&P 500. But that alone doesn't tell the whole story of the drugmaker's recent woes. In October 2020, Vertex's stock dropped precipitously in one day after the company announced its decision to discontinue the development of VX-814, a potential treatment for alpha-1 antitrypsin deficiency (AATD). 

The company's decision came after it observed elevated liver enzymes in several AATD patients in a midstage trial for VX-814. But this market reaction may have been a bit overblown. For one, Vertex is known primarily for its drugs that treat the underlying causes of cystic fibrosis (CF), a rare genetic condition that affects a patient's internal organs. 

Vertex's most important CF drug, Trikafta, has a patent that will be valid until 2037. Trikafta can treat about 90% of the CF population. Even if competitors -- some of whom are looking to develop competing CF drugs -- manage to enter this market, thanks to its first-mover advantage, Vertex will likely remain the leader in this space for the foreseeable future.

Also, while VX-814 may have helped diversify its revenue stream away from Trikafta and other CF medicines, Vertex has other promising pipeline products that could do just that. There is VX-864, another potential drug for AATD, which, according to the company, is "structurally different" from VX-814. In other words, the failure of the former is not at all indicative of what may happen to the latter. Vertex said it expects to release data from a phase 2 clinical trial for VX-864 in the first half of this year.

Then there is CTX001, a potential gene editing therapy for transfusion-dependent beta-thalassemia (TDT) and sickle cell disease (SCD) the company is developing in collaboration with CRISPR Therapeutics. CTX001 has shown success in preventing vaso-occlusive crises (a side effect of SCD that causes acute pain) in several patients, among other positive results. 

Management believes regulatory submission for CTX001 could happen within the next 18 to 24 months. Further, Vertex is an ambitious company with several more pipeline candidates, including one targeted at type 1 diabetes. And if that seems like too much of a long shot, consider that the biotech generated a little more than $3 billion in free cash flow over the trailing 12-month period.

If none of its current programs pan out (which seems unlikely), expect Vertex to go out and purchase the rights to others -- or even acquire a smaller biotech with a rich and promising pipeline. The combination of all those factors makes Vertex a biotech stock still worth buying.

2. Shopify

In the past few months, the market hasn't been kind to high-flying growth stocks. Shares of e-commerce giant Shopify -- a market favorite and growth stock extraordinaire -- are down by 11.38% since late February. How long will the market keep Shopify down? I am not sure, but as a shareholder, I feel just fine. Shopify remains one of my highest conviction holdings for two simple reasons. First, there is the growth of the e-commerce industry. 

Despite many investors and analysts preaching the death of brick and mortar businesses, these businesses are not quite dead yet. Sure, many traditional retailers are struggling, but online transactions still make up a small percentage of total transactions in the U.S. According to the U.S. Department of Commerce, e-commerce sales accounted for just 13.4% of total sales during the first quarter of 2021.

Keep in mind, e-commerce penetration is even lower in many other parts of the world, particularly in less developed nations. In other words, this space can still grow by leaps and bounds, and Shopify and its peers can continue to profit for many years (and potentially decades) to come.

Couple doing online shopping.

Image source: Getty Images.

Then there is Shopify's "sticky" business model: that is, one which is constructed in such a way as to retain customers, thereby creating a growing source of recurring revenue. Think about the amount of work it takes to create a storefront from scratch (which is what Shopify offers merchants on its platform), particularly for those who aren't tech or internet-savvy. 

But that's just the first step -- then, a business owner has to attract customers to its shiny, new online presence. Merchants on Shopify's platform also rely on the company for a plethora of other services, including billing, shipping, and more. Once an entrepreneur has gone through all this trouble, the incentive to switch to one of Shopify's competitors is pretty low. 

This isn't just a matter of convenience either, although that's part of it. But the process could actually be harmful to the business. This powerful source of a competitive advantage is why I am confident Shopify will keep most of its clients while continuously adding new ones. And that can only mean great news for the company's revenue, profits, and stock market performance in the long run.

In five years or so, we may look at the recent market turmoil as a great buying opportunity for Shopify.