The coronavirus pandemic is wreaking havoc around the world. Regretfully, more than 31 million people have been infected by the virus, and more than 962,000 have lost their lives. If you consider the rest of the population, billions of people are experiencing significant changes in their daily lives. You may no longer work the way you were accustomed to. Your kids, whether in K-12 or college, are likely learning from home rather than in classrooms.

It's becoming more likely that the virus is not going away, and a vaccine will be necessary to help us eradicate COVID-19. According to the Centers for Disease Control and Prevention, there are 170 vaccine candidates in development around the world. One of the more promising companies conducting trials, AstraZeneca (AZN 0.46%), had to temporarily pause its trial on Sept. 8 after a woman injected with its vaccine experienced an illness.

Among the many ongoing trials, most news on the progress has been positive. However, there is a probability further delays will occur in developing a COVID-19 vaccine. Here are two stocks to buy that will protect your portfolio in that scenario. 

A nurse holding a syringe with the label "COVID-19 vaccination."

AstraZeneca paused its vaccine trial. Image source: Getty Images.

Chegg: Getting an "A" from investors

If you want to benefit from education moving online, look to the company built on that premise: Chegg (CHGG -2.12%). CEO Dan Rosensweig said in the company's most recent earnings release, "Chegg was built with the belief that learning would move increasingly online, and we have always bet on that inevitability. The COVID-19 pandemic has accelerated that shift."

A delay in achieving herd immunity in the population through vaccination means more schools and universities will be moving education online and keeping it there longer. Revenue is surging for Chegg in part because students' needs for supplemental resources are going up as remote learning takes precedence.

In its most recent quarter, revenue increased by 63% year on year. Further, the company expects the elevated demand to continue, forecasting that revenue will increase by 51% in its third quarter and 48% for the whole year. Importantly, this guidance was given before the California State University (CSU) system, the largest in the U.S., announced that its spring semester would be conducted entirely online.

What's more, profits are rising faster than revenue -- demonstrating the company's economies of scale. In Q2 when revenue increased by 63%, operating income tripled. Investors will do well with companies that are expecting to grow revenue significantly while keeping costs under control.

Admittedly, the company is not selling cheaply. In fact, Chegg is trading at a trailing-12-month (TTM) price-to-sales ratio over 16, the highest it has sold for in the last six years. However, with a growth rate of over 40% forecasted for 2020, the CSU system telegraphing at least 16 more weeks of remote instruction in 2021, and the long-run trend of instruction moving online, Chegg's stock is well worth the premium cost for the protection against the coronavirus for your portfolio.  

A young woman studying.

Revenue is surging for Chegg. Image source: Getty Images.

Netflix: At the forefront of in-home entertainment 

As billions of people continue staying at home, the demand for in-home entertainment is soaring. If there is a delay in vaccine development, Netflix (NFLX 1.74%) will likely grow its massive 193 million subscriber base and save money on content creation costs.

In the July letter to shareholders, CEO Reed Hastings said he expected Netflix to add 2.5 million subscribers in the next quarter. He thinks the company pulled forward the growth in subscribers, indicating that it may start to experience slower subscriber growth in the near future. However, if there is a delay in vaccine development, and the stay-at-home trend persists, the consumer interest that led to Netflix adding 26 million subscribers in the first half of this year may continue.

A vaccine delay will also mean lesser new content would be created, which means the company will increase revenue while decreasing costs. And because the suspension in new productions is an industry-wide phenomenon, Netflix will not be at a competitive disadvantage. In fact, Netflix's attraction lies in its ability to produce original content, and there doesn't seem to be any slowdown there yet.

The stock is up 50% year to date. Still, it's trading at a TTM price-to-sales ratio of 9.4, which is well below its peak of 12.7 in 2018. The fair price, combined with its excellent prospects in the event of a COVID-19 vaccine delay and the long-run trend of people cutting cable in favor of streaming services, makes this consumer goods stock a buy for long-term investors.