2020 has brought investors the first bear market in over a decade. The S&P 500 Index (SNPINDEX:^GSPC) has lost more than 25% so far this year, falling more than 30% from its highest levels set just a month or so ago.

As you look for stocks that can deal with bear market conditions, you should remember that this isn't the first bear market we've ever had. Past performance is no guarantee of future results, and so the stocks that did well in the last bear market in 2008 -- in which the S&P lost 37% on the year -- won't necessarily manage to post positive returns this time around. That said, the following four companies are showing signs of holding up well during the current bear market, building up their reputation as having stood the test of time. Below, we'll look at these four stocks to see what the secrets of their success have been.

NFLX Chart

NFLX data by YCharts. As of market close March 19.

Netflix

Netflix (NASDAQ:NFLX) was in the middle of its initial growth spurt in 2008, having gone beyond its DVD-mailing subscription-based business to offer highly innovative video streaming services. The stock ended 2008 higher by 12%, managing to outperform the S&P by nearly 50 percentage points and demonstrating its staying power under tough financial conditions.

Bear with mouth open.

Image source: Getty Images.

During the current bear market, Netflix has just managed to eke out a gain, rising 3% so far in 2020. Netflix's streaming video business has expanded dramatically over the past dozen years, becoming a staple for millions of households across the globe. With the COVID-19 pandemic forcing many people around the world to stay home, Netflix can expect more people to become loyal customers in the months to come.

General Mills

Producers of basic goods often manage to hold up well during economic downturns, and it doesn't get much more basic than the breakfast cereal and other food products that General Mills (NYSE:GIS) puts on tables both in the U.S. and abroad. During the financial crisis in 2008, General Mills' simple business model gave shareholders a 9% gain on the year, with a healthy dividend playing a key role in the food stock's total return over time.

Heavy demand for shelf-stable food products during the coronavirus outbreak has helped General Mills grow. Although the stock is up just a fraction of a percent in 2020, General Mills has redoubled its efforts to maximize production and make sure that its cereals and other food products are always available. That should bode well for its long-term prospects.

Gilead Sciences

Gilead Sciences (NASDAQ:GILD) did well in 2008, with the biotech stock managing to post an 11% gain for its shareholders during the bear market then. Although many companies in the technology and biotech space suffered in the financial crisis, Gilead had already built up an important presence in some key treatment areas. That made its business more recession-resistant and ensured that there'd be a constant stream of customers needing its treatments.

Gilead's expertise is once more helping it in 2020, as hopes rise for a treatment to prevent people from getting the COVID-19 disease or to lessen its effects in those who've already caught the coronavirus. It's far from certain that remdesivir will prove to be instrumental in developing a vaccine or cure against the SARS-CoV-2 virus. But Gilead has already started some clinical trials in the U.S. to test remdesivir's potential in fighting the coronavirus. A victory could bring huge future gains for the stock.

Walmart

Walmart (NYSE:WMT) was a key winner for shoppers and shareholders both in 2008. Customers flocked to its stores to capture low prices on the goods they needed, and shareholders got rewarded for their loyalty with a 20% gain that year, beating the S&P by 57 percentage points. In doing so, Walmart earned a reputation for benefiting when retail rivals targeting higher-end goods struggled.

No one's declared an official recession yet, but signs are pointing to tough times ahead in 2020, and Walmart is poised to take full advantage as it did a dozen years ago. The big-box retailer has faced many of the same struggles as other retail companies, shortening its hours and having some times set aside specifically for older customers. Yet even if that hurts Walmart's short-term prospects, it'll only put it in a better position to thrive in the long run.

Passing the test

Not all of these stocks have done particularly well during the bull market of the 2010s. But when investors need more reliable stocks with defensive characteristics, companies like these are natural picks. Going forward, it's highly possible that Walmart, Gilead, General Mills, and Netflix will continue to hold up well even under the shadow of the coronavirus.