AI Backtest

Backtest: When the daily count of news articles mentioning Iran, Hormuz, or sanctions i...

12.01%
Return on capital

When a headline screams about Iran, Hormuz, or sanctions, the reflexive trade is to buy energy stocks. Supply risk should lift XLE, at least for a few sessions. This study tests that reflex systematically: top-decile news days over a one-year rolling window, buy at the close, exit five days later.

The result is a modest positive — 75 trades, a 53.3% win rate, and a 12.01% gain on $100,000. But against a buy-and-hold SPY position that returned 68.30% over the same stretch, the strategy lagged by over 56 points. The news edge exists; it just isn't big enough to beat simply owning the market.

The full backtest below breaks down every trade, the return distribution, and the methodology.

The strategy

When the daily count of news articles mentioning Iran, Hormuz, or sanctions is in the top decile of its one-year history, buy XLE at the close; exit after 5 trading days. Geopolitical flare-ups trigger a supply-risk rally in energy stocks that persists for a few days before fading.

How this was measured

This is a simulated backtest generated from the plain-English strategy below, executed bar-by-bar on historical market data using the price + news data mode with $100,000 starting capital. Strategy: When the daily count of news articles mentioning Iran, Hormuz, or sanctions is in the top decile of its one-year history, buy XLE at the close; exit after 5 trading days. Geopolitical flare-ups trigger a supply-risk rally in energy stocks that persists for a few days before fading.

The key numbers

Return on capital
12.01%
total P&L over starting capital
Total P&L
$12,005.55
Closed trades
75
Win rate
53.3%
share of closed trades in profit
vs SPY
-56.30%
excess return over SPY buy-and-hold

The charts

Equity curve (growth of 100)

The takeaway

The strategy returned +12.01% on $100,000 starting capital across 75 closed trades with a 53% win rate. Over the same window SPY buy-and-hold returned +68.30%, so the strategy finished trailing the benchmark by 56.30 points. Best single trade +5.62%, worst -10.50%.

The fine print