The US–Iran conflict may be over, but the damage to the global economy will linger. For tech investors, however, the war has hardly registered. A review of sector ETFs shows that tech stocks have soared since the attacks on Iran began on Feb. 28, lifting this slice of the US equities market far above the rest of the field.
The SPDR S&P 500 Tech ETF (XLK) has surged nearly 35% during the war through yesterday’s close (June 16), a sharp premium over the broad market’s 9.7% gain over the same period, based on the SPDR S&P 500 (SPY). Notably, every other sector in the S&P 500 has lagged the market since the military strikes commenced. The path to beating the market, in other words, has been all about tech stocks in the extreme during the war.
The results underscore how pre‑war assumptions about defensive strategies have been upended. The idea that tech stocks would offer the safest haven during a spike in geopolitical risk centered on energy and the Middle East is obvious in hindsight, but few investors anticipated it on the eve of the conflict.
Another surprise: the utilities sector (XLU), a traditional safe haven, has suffered the most during the conflict, losing nearly 5%.
The consensus narrative is that tech has outperformed the broader market during the Iran war primarily because investors have treated the sector as a relative safe haven, supported by strong earnings expectations and limited exposure to the spike in energy costs that has been more problematic for other parts of the economy, such as transportation.
Bullish expectations for artificial intelligence have also been a major force behind tech’s resilience, helping the sector outperform even during periods of geopolitical stress. Investors increasingly view AI not just as a long‑term growth theme but as a near‑term earnings engine, and that optimism has supported valuations across hardware, cloud, and semiconductor names.
The use of “AI” during recent earnings conference calls highlights the sharp focus on the topic and how it is driving expectations. FactSet reports that “the term ‘AI’ was cited on 337 earnings calls conducted by S&P 500 companies during this period. This number is well above the 5‑year average of 164 and the 10‑year average of 103.”
The sentiment shift is based on fundamentals, the bulls argue. AI‑driven capital spending and cloud demand are doing the heavy lifting for S&P 500 earnings growth, with the technology sector contributing the overwhelming majority of that strength.
Analysts at LPL Research recently wrote: “As investment in AI ramps up and the market’s confidence in technology’s value increases… the outlook for the technology sector improves. The debate about whether AI will fulfill its promise as a productivity enhancer won’t be settled for quite some time. But what we do know is that massive spending is going to continue.”
Citi’s Scott Chronert agrees, predicting that AI‑driven earnings momentum will continue:
The underlying earnings trajectory for the S&P 500 is moving down a path that is way beyond what we expected headed into this year. Q1 results have set the stage, which should drive further momentum for the remainder of this year and into next… Traditional macro models for projecting earnings seem increasingly misplaced as the AI‑inspired spending surge is manifesting across many sectors.
Skeptics counter that whatever the business merits of AI, expectations have run too hot too fast. “Artificial intelligence may transform the economy over the long term, but investors betting on today’s AI boom should remember the lessons of railways, dot‑coms and every great technological mania before them,” writes Toby Walsh, professor of AI at UNSW Sydney and chief scientist of their AI Institute. “There’s only one way this ends. With the AI bubble bursting.”
Perhaps, but whatever the merits of staying cautious, such advice remains an outlier on Wall Street.
Learn To Use R For Portfolio Analysis
Quantitative Investment Portfolio Analytics In R:
An Introduction To R For Modeling Portfolio Risk and Return
By James Picerno

