It might be tempting to think that record highs in major indexes like the Dow Jones Industrial Average mean it's a bad time to find bargains in the stock market. The truth is that there are always bargains, although you might have to dig a little to find them.

There are always stocks that get left behind in a market rise because they are simply lumped together with other stocks in an out-of-favor group or because their particular business is facing a near-term challenge. Long-term investors can take advantage of these situations to pick up quality stocks on sale. Market sentiment will change, and well-run businesses with strong positions in their markets should overcome problems.

Below are three stocks that I consider to be bargains. The first two are cheap by standard valuation benchmarks despite thriving businesses and are relatively safe bets. The third is a bit riskier but could pay off big time in the long run.

Person holding a jar full of money.

Image source: Getty Images.

Emergent BioSolutions

You might think that the stock of a company that specializes in public health threats and that is deeply involved in manufacturing vaccines to fight the COVID-19 pandemic would be soaring right now. Shares of Emergent BioSolutions (EBS 9.68%), however, are down 43% from their peak and are selling for a remarkably low valuation.

Emergent focuses on preparedness and response products for terrorist threats, emerging infectious diseases, travel health, and emergency care. It recently began selling selling contract development and manufacturing organization (CDMO) services that leverage its expertise in drug manufacturing. This new business may be its biggest growth driver in the future. The company has landed partnerships with Johnson & Johnson, AstraZeneca, Novavax, and Vaxart to manufacture those companies' COVID-19 vaccines. Emergent is also working on plasma-based COVID-19 treatments of its own using the approach it took for anthrax and smallpox medicines. It's the CDMO business that could just about double the company's revenue in the long term, however.

Investors were high on the stock earlier this year, but shares have been hammered since the two candidates using the mRNA approach took the lead in the vaccine race in front of Emergent's four partners. Multiple vaccines will be needed to combat the threat, however. Emergent has already locked in over $1.5 billion in contracted CDMO revenue from these partners -- not bad for a company that had $1.1 billion in revenue in all of 2019.

There will be more public health threats after COVID-19, and Emergent will be in a good position to capitalize on those. In the meantime, long-term government contracts have locked in a dependable stream of highly profitable business. Biotech stocks rarely sell for low profit multiples, but Emergent's shares sell for a cheap nine times estimates of next year's earnings per share, which analysts predict will grow 24% over 2020.

CVS Health

Shares of CVS Health (CVS 1.49%) took a hit when Amazon announced its highly anticipated pharmacy services. Despite the threat from the giant retail disrupter, CVS stock is still a bargain.

CVS has been working for years to become more than a pill dispenser. The company's merger with Aetna created an integrated healthcare company, with health insurance and pharmacy benefit management businesses building on its retail locations. Pharmacy sales now amount to only 26% of the company's revenue.

The company is also making its physical locations into medical clinics, offering valuable in-person services that can't be easily replicated online. The company administered 6 million COVID-19 tests in Q3 and is preparing to administer coronavirus vaccines when they come available. Additional store traffic for these services, along with seasonal flu vaccines, health screenings, diabetes management, and other clinical offerings, will bolster both pharmacy sales and front store purchases.

CVS shares are down for the year along with other retail companies in the challenging environment, but the company still grew. Revenue for the first nine months of 2020 was up 3.5% and adjusted earnings per share grew a healthy 16%. Analysts expect the company to grow profit in the low single digits next year, but CVS has beaten analyst estimates for EPS 19 quarters in a row. The stock also pays a very safe 3% dividend yield.

Fulgent Genetics

Fulgent Genetics' (FLGT 1.24%) core business is in low-cost genetic tests for delivering actionable diagnostic information to clinicians. The company's tests, which use next-generation gene sequencing, check for 5,700 genetic conditions, including cancers, cardiovascular diseases, neurological disorders, and pediatric conditions. The company is focused on bringing the cost of tests down to eventually make genetic testing a routine part of standard medical care.

This core business isn't what captured investor attention this year. The company's technology proved adaptable enough that it could quickly develop two versions of COVID-19 tests that won authorization, one of which can be taken at home. Sales have been through the roof, essentially dwarfing the company's core business.

Fulgent's stock soared this summer, but shares have lately been falling along with those of other testing stocks. Positive vaccine news has made investors look ahead to a decline in demand for coronavirus testing. The stock sells for 30% below its August peak.

The market is correct that the company is getting a temporary windfall, but testing for the SARS-CoV-2 virus is going to be with us longer than some people think. The company has demonstrated how it can turn an opportunity into a commercial success in short order, greatly expanding its customer base in the process. Fulgent expects revenue for the full year to come in 800% above 2019.

I think Fulgent stock is a bargain for risk-tolerant investors who are patient enough to wait a few years. The shares sell for seven times estimates for EPS in 2021, and even though earnings may drop off for a while after that, the company is making piles of cash it can use to reinvest for growth in the business. The stock may continue to fall in the short term, so it could be wise to buy it a little now and add to the position if it gets even cheaper.