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

Source The 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
The dollar weakened, equities dipped, and gold hit record highsThe dollar weakened, equities fell, and gold set new records on Wednesday as investors waited for a Fed rate cut later in the day.
Author  Cryptopolitan
Sep 17, 2025
The dollar weakened, equities fell, and gold set new records on Wednesday as investors waited for a Fed rate cut later in the day.
placeholder
Markets in 2026: Will gold, Bitcoin, and the U.S. dollar make history again? — These are how leading institutions thinkAfter a turbulent 2025, what lies ahead for commodities, forex, and cryptocurrency markets in 2026?
Author  Insights
Dec 25, 2025
After a turbulent 2025, what lies ahead for commodities, forex, and cryptocurrency markets in 2026?
placeholder
ECB Policy Outlook for 2026: What It Could Mean for the Euro’s Next MoveWith the ECB likely holding rates steady at 2.15% and the Fed potentially extending cuts into 2026, EUR/USD may test 1.20 if Eurozone growth proves resilient, but weaker growth and an ECB pivot could pull the pair back toward 1.13 and potentially 1.10.
Author  Mitrade
Dec 26, 2025
With the ECB likely holding rates steady at 2.15% and the Fed potentially extending cuts into 2026, EUR/USD may test 1.20 if Eurozone growth proves resilient, but weaker growth and an ECB pivot could pull the pair back toward 1.13 and potentially 1.10.
placeholder
Gold tumbles below $4,650 as inflation fears and liquidity squeeze weighGold price (XAU/USD) remains under selling pressure near $4,640 during the early Asian session on Friday. The precious metal extends the decline as soaring crude oil and energy prices, driven by the escalating US-Israeli war with Iran, reignite inflation fears.
Author  FXStreet
Mar 20, Fri
Gold price (XAU/USD) remains under selling pressure near $4,640 during the early Asian session on Friday. The precious metal extends the decline as soaring crude oil and energy prices, driven by the escalating US-Israeli war with Iran, reignite inflation fears.
placeholder
Iran threatens to completely close Strait of Hormuz if US bombs power plantsIran’s Islamic Revolutionary Guard Corps (IRGC) said that it will completely shut the strait if US President Donald Trump proceeds with his threats to target Iranian energy facilities, the Guardian reported on Monday.
Author  FXStreet
12 hours ago
Iran’s Islamic Revolutionary Guard Corps (IRGC) said that it will completely shut the strait if US President Donald Trump proceeds with his threats to target Iranian energy facilities, the Guardian reported on Monday.
goTop
quote