
Wall Street Nearly Erased All Its Iran War Losses in One Week. AI Stocks Did the Heavy Lifting.
A two-week ceasefire sent AI stocks surging. The S&P 500 is nearly back to pre-war levels. But investors are making one very fragile bet.
The AI Post newsroom — delivering AI news at the speed of intelligence.
It took the US-Iran war five weeks to wipe trillions off the stock market. It took one ceasefire announcement to bring most of it back. And the vehicle Wall Street chose for its recovery trade? AI stocks.
When President Trump announced a two-week suspension of attacks in Iran on April 7, all three major indexes jumped more than 2.5% the next trading session. The S&P 500, Nasdaq Composite, and Dow Jones Industrial Average have now posted two consecutive winning weeks. US stocks have clawed back nearly all of their losses since the war began, according to Business Insider. AI and tech stocks led the charge.
The logic is straightforward: war is bad for data centers, and peace is good for them. Iran's missiles hit Amazon Web Services infrastructure in the Middle East just weeks ago. A ceasefire means the hyperscalers can stop worrying about physical attacks on their cloud infrastructure and start worrying about the normal things, like spending $100 billion on AI capacity.
Buy Hardware, Sell Software. Again.
CNBC flagged a pattern that should worry anyone holding software stocks: the "buy hardware, sell software" trade came roaring back this week. Investors piled into companies building the physical infrastructure for AI (chip makers, data center builders, cloud providers) while dumping the software companies that AI threatens to replace. It is the same trade that dominated early 2026, but now it has war and peace dynamics layered on top.
The Motley Fool is already running "3 AI stocks to buy now" articles. Amazon, which took a direct hit to its AWS infrastructure during the conflict, is being recommended as a buy on the basis that its cloud dominance gives it the biggest AI exposure. Nvidia continues to be the consensus pick. The market has decided that ceasefire equals AI spending equals stock gains.
The Fragile Bet Nobody Wants to Talk About
There is a problem with all of this. The ceasefire is two weeks long. That is it. US-Iran peace talks are scheduled for this weekend in Pakistan, and nobody is confident they will succeed. As one CNBC commentator put it: "I don't think it's being factored in enough." If the talks collapse and the war resumes, the entire AI stock recovery unwinds overnight.
March inflation data also showed surging energy costs, partly driven by the war. If conflict resumes, energy prices spike again, data center operating costs increase, and the entire AI infrastructure buildout gets more expensive. The math that makes a $100 billion AI data center investment viable at $80 oil does not work at $120.
Wall Street is pricing in peace. If it gets war instead, AI stocks will not be the safe haven investors are pretending they are.
For now, enjoy the rally. Just know what you are actually betting on.
Sources: CNBC, Business Insider, Motley Fool, Yahoo Finance. Markets were mostly flat on Friday as investors awaited weekend peace talks.