Jeff Bezos Getty Images

When the stock market is in a correction and careening toward a bear market like it is now, history shows there are certain stocks that get hit the hardest and the least during those tumultuous periods. CNBC, using data from Kensho, looked at periods during the last three decades when the S&P 500 fell 10 percent or more in a six-month span. The S&P 500 is currently 16 percent below its record reached earlier this year. (A decline greater than 10 percent is a correction and a loss bigger than 20 percent is a bear market.) Technology stocks, the favorites of traders during the record bull market, are typically the biggest losers, according to data from Kensho. The S&P tech sector on average loses 20.3 percent, when the S&P 500 is down at least 20 percent. So it's rare for the sector to skirt a bear market when the bigger benchmark is in a correction. Financials are not far behind, history shows, losing 19 percent on average in the same market conditions.

To be clear, not all of these downturns ended up in a bear market. The S&P 500, as a benchmark during those time periods, loses an average of 14 percent.

Where to hide out?

Consumer staples still suffer, but the damage is less severe than in other areas. That sector loses 1.6 percent on average. Health care is the second-best performer of the group, losing only 5.2 percent on average, followed by utilities, which tends to lose 6 percent. Traders are already starting to give up on high-flying tech stocks, fueled by concerns over regulation and high valuations. The Nasdaq Composite entered bear market territory Thursday for the first time since October 2011. The index, which hasn't closed in bear market levels since August 2009, fell more than 2 percent Thursday and remains more than 20 percent off its recent high. Investors had bought up tech stocks in the past two years amid a swell in demand for chips, and accelerating revenues at Facebook and Amazon. WATCH: Remember when Amazon's stock tanked 90%? Long-term investors still got rich