Stocks keeps setting new records, and with new stimulus checks starting to hit bank accounts, it could mean even more money will flow into the market. But sooner or later the spigot will get turned off and the market will tumble once again.

Trying to time entry and exit points is a poor investment strategy, so it's better to buy stocks that can do well regardless of whether market conditions are good or bad. Here are three companies that should be able to perform well when the sun is shining, and hold up if (or when) the market collapses.

Man holding his head looking at a laptop screen

Image source: Getty Images.

Amazon.com

E-commerce giant Amazon.com (AMZN -1.64%) revealed the essential nature of its business early in the COVID-19 pandemic. Not only did the market plunge, but the economy was shut off too, except for a few essential businesses that were allowed to profit during the crisis.

Amazon was one of them, and it proved just how critical its online business model was to everyone's survival. The ability to order necessities and have them delivered to your door when you weren't supposed to go out enabled many people to get through the coronavirus outbreak's early stages.

Amazon's cloud business also shone as an essential service, keeping many businesses solvent when they couldn't open their doors. Amazon Web Services, which serves as the backbone of many businesses' online infrastructure, kept them up and running.

In any future market collapse, expect consumers and businesses to turn to Amazon.com for the goods and services they need.

Axon Enterprise

Even for cities that called loudest for defunding the police, law enforcement remains a critical element of society. Portland, Oregon, for example, slashed $15 million from its police budget last summer and saw a spike in violent crime afterwards. It's now asking for $2 million to restore proactive policing units that were dissolved.

To protect both police and citizens, more departments than ever are equipping their officers with both less-than-lethal weapons and body cameras -- and Axon Enterprise (AXON 0.28%) is by far the largest provider of both. It recently received its largest order ever for its Taser 7 stun gun, with sales of the electrical weapons surging 61% in the fourth quarter.

Axon's Tasers, body cams, and digital evidence management systems are all seamlessly integrated, and Axon has launched a new command center product and drone surveillance capabilities that are also tied into its ecosystem.

In times of economic stress, crime tends to rise, making Axon Enterprise's equipment even more vital should the good times in the market come to an end.

Netflix

What else are you going to do when you have little money to spare for outside entertainment but sit on the couch and watch Netflix (NFLX -3.92%)

Even after raising its prices again this year, the fifth time in the last seven years, Netflix's streaming video service is still under $15 per month, which means it still represents an affordable form of entertainment for the whole family. And though it hasn't even reached a saturation point in the U.S., the real expansion opportunities are international, with plenty of room to expand its 204 million paying subscribers in foreign markets.

Netflix is a financially stable business with recurring streams of revenue for which it probably hasn't hit a peak price yet. It told investors earlier this year that it doesn't need to rely upon outside sources of financing anymore to fund its growth, and with a stable of hit original programs to fuel continued consumer interest -- it just received 35 Academy Award nominations, more than any movie studio or competing streaming service -- it can easily survive an extended market downturn until things look up again.

Looking for the silver lining

Market corrections happen. And downturns are no fun for anyone -- people suffer real damage to their portfolios and their lives. That's why investors need to do what they can to protect themselves.

You could cobble together an assortment of staid, boring stocks to weather the storm, or you could instead choose a collection of winning business that should fare well -- or even grow -- during such a calamity. It just might be the best way to ensure you're in good shape when the markets turn up again.