What Sectors Are Not Getting Hit by the Market Sell-Off?

Source Motley_fool

Key Points

  • Energy stocks are up as rising oil and gas prices will boost revenue and profits.

  • The AI build-out continues to power computer hardware and memory manufacturing stocks.

  • Demand for cybersecurity products is rising as a result of geopolitical tensions.

  • 10 stocks we like better than Sandisk ›

The S&P 500 index has fallen about 4.5% since the Middle East war started. And it continues to drop. As a result, most sectors of the S&P 500 are deep in the red for March (March 2 was the first trading day after the war began).

But not all sectors are down. A few are solidly in the green this month. That begins with energy stocks. With the Strait of Hormuz effectively closed, prices of both crude oil and natural gas have spiked on world markets. The average price of a gallon of gasoline has soared by almost $1.

Will AI create the world's first trillionaire? Our team just released a report on the one little-known company, called an "Indispensable Monopoly" providing the critical technology Nvidia and Intel both need. Continue »

That's all great news for energy companies and their shareholders. ExxonMobil (NYSE: XOM) is up 3.3% this month, and Chevron has climbed almost 8%. ConocoPhillips is up 11% for the month. Large refiners like Phillips 66, Valero Energy, and Marathon Petroleum are also up by double digits.

The AI build-out is bolstering computer hardware and storage stocks

But gains since the war broke out aren't limited to energy stocks. Several stocks in the computer hardware subsector have also posted strong gains in March.

Sandisk (NASDAQ: SNDK) was the best-performing stock in the S&P 500 index last year, with an incredible 559% return. It's doing it again in 2026, up more than 210% year to date and 17% since the war started. The company makes flash storage devices that can retain data without a power source.

Western Digital also makes data storage products, though it's focused on hard drives rather than flash memory. That stock soared last year, up a whopping 282%, and is also putting in a repeat performance in 2026, up 78% this year and 11% in March. International Business Machines and Dell Technologies are also having a very good March. Add to that list Micron Technology, which has climbed more than 7% this month, also driven by soaring memory demand.

It seems computer hardware stocks haven't been dragged down by the war and soaring oil prices because AI-driven demand for servers, storage, and peripheral equipment continues to outpace supply. For the moment, at least, that tailwind remains more powerful for this group of stocks than the headwinds of war-driven inflation and energy concerns.

Cybersecurity stocks are gaining from ongoing geopolitical hostilities

Finally, several stocks in the software infrastructure group have put in banner performances in March. Palantir Technologies, Palo Alto Networks, and CrowdStrike Holdings are each up more than 10% since the beginning of the Middle East conflict. It's no wonder, as the three companies are leaders in AI-driven security and data analytics, including cybersecurity. Sophisticated modern warfare is obviously going to drive demand for the products those companies offer.

A cybersecurity operation.

Image source: Getty Images.

Oracle (NYSE: ORCL), also in that group, is up nearly 7% in March. Its stock is being rewarded by the company's big AI contract wins and a huge surge in cloud infrastructure revenue.

If you look at a market heatmap like Finviz, those three sectors -- energy, computer hardware, and cybersecurity -- are basically the only real pockets of green in a giant sea of red since the war began, as soaring oil prices continue to weigh heavily on most other sectors and will probably continue to do so until crude retreats back to under $100 a barrel.

Whether you should consider an investment in energy stocks depends, at least in part, on how long you expect the war to continue and oil prices to remain elevated. Demand for AI-infrastructure stocks looks to continue through 2026. And cybersecurity stocks could see ongoing demand as cyber warfare doesn't look to decrease any time soon.

Should you buy stock in Sandisk right now?

Before you buy stock in Sandisk, consider this:

The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Sandisk wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.

Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $495,179!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,058,743!*

Now, it’s worth noting Stock Advisor’s total average return is 898% — a market-crushing outperformance compared to 183% for the S&P 500. Don't miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.

See the 10 stocks »

*Stock Advisor returns as of March 23, 2026.

Matthew Benjamin has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Chevron, CrowdStrike, Micron Technology, Oracle, Palantir Technologies, Phillips 66, and Western Digital. The Motley Fool recommends ConocoPhillips and Palo Alto Networks. The Motley Fool has a disclosure policy.

Disclaimer: For information purposes only. Past performance is not indicative of future results.
placeholder
Trump’s 48-Hour Ultimatum to Iran Just Sent Markets Into Monday With No Exit PlanUS stock futures fell at Sunday’s open after President Trump gave Iran 48 hours to fully reopen the Strait of Hormuz, threatening to “hit and obliterate” the country’s power plants starting with the l
Author  Beincrypto
12 hours ago
US stock futures fell at Sunday’s open after President Trump gave Iran 48 hours to fully reopen the Strait of Hormuz, threatening to “hit and obliterate” the country’s power plants starting with the l
placeholder
Is Every Bank Launching a Stablecoin Quietly Building the Case for XRP?XRP (XRP) fell 3.74% to $1.39 on March 22, trading 62% below its July 2025 all-time high of $3.65, as open interest collapsed 75% from its peak and leveraged positions continued to unwind.The price de
Author  Beincrypto
12 hours ago
XRP (XRP) fell 3.74% to $1.39 on March 22, trading 62% below its July 2025 all-time high of $3.65, as open interest collapsed 75% from its peak and leveraged positions continued to unwind.The price de
placeholder
Will TRUMP Holders $70 Million Flash Selling Push Price To Historic Lows?Official Trump (TRUMP) price is trading at $3.21, down 1.32% on the day, after surrendering nearly all of a 49.65% rally that peaked on March 13.The token now sits 3.2% above its all-time low of $2.70
Author  Beincrypto
12 hours ago
Official Trump (TRUMP) price is trading at $3.21, down 1.32% on the day, after surrendering nearly all of a 49.65% rally that peaked on March 13.The token now sits 3.2% above its all-time low of $2.70
placeholder
Gold Just Had Its Worst Week Since 1983: Here’s Where Smart Money May Go NextGold’s sharpest weekly decline in over four decades is rattling global markets and forcing a rethink of what constitutes a “safe haven” in today’s macro environment.The precious metal, long viewed as
Author  Beincrypto
12 hours ago
Gold’s sharpest weekly decline in over four decades is rattling global markets and forcing a rethink of what constitutes a “safe haven” in today’s macro environment.The precious metal, long viewed as
placeholder
Iran responds forcefully to Trump's latest threats targeting Iran’s power plantsIran answered President Donald Trump’s 48-hour warning to hit Iran’s power plants if Tehran did not open the Strait of Hormuz within two days. Iran’s military answered by saying any U.S. strike on non-military energy sites would trigger attacks in return. That put the focus back on the waterway that carries a huge share of […]
Author  Cryptopolitan
12 hours ago
Iran answered President Donald Trump’s 48-hour warning to hit Iran’s power plants if Tehran did not open the Strait of Hormuz within two days. Iran’s military answered by saying any U.S. strike on non-military energy sites would trigger attacks in return. That put the focus back on the waterway that carries a huge share of […]
goTop
quote