AI Backtest

Backtest: Buy USO at the close when the 5-day average of Iran/Hormuz/sanctions/OPEC hea...

74.14%
Return on capital

The pitch sounds right: when Iran, Hormuz, sanctions or OPEC dominate the headline tape, crude tends to keep a bid, so a sharp one-day drop in USO against that backdrop should be worth buying. That is what this study tests — dip-buying only when the 5-day headline average sits above its trailing 252-session median, with an exit on a bounce above the 5-day average or after five sessions, whichever comes first.

The split verdict is the interesting part. The rule made money — +74.14% on $100,000 — and won 67.9% of its trades, yet it still finished behind plain SPY buy-and-hold over the same window. Whether the win rate or the benchmark gap better describes the strategy is what the full analysis below takes apart.

The strategy

Buy USO at the close when the 5-day average of Iran/Hormuz/sanctions/OPEC headline mentions is above its trailing 252-session median and USO closes down at least 1%; exit when USO closes above its 5-day simple moving average or after 5 trading days, whichever comes first. A supply-shock headline tape that is still running hot tends to keep a bid under crude, so buying a USO dip while geopolitical risk is elevated catches the risk premium before it decays.

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: Buy USO at the close when the 5-day average of Iran/Hormuz/sanctions/OPEC headline mentions is above its trailing 252-session median and USO closes down at least 1%; exit when USO closes above its 5-day simple moving average or after 5 trading days, whichever comes first. A supply-shock headline tape that is still running hot tends to keep a bid under crude, so buying a USO dip while geopolitical risk is elevated catches the risk premium before it decays.

The key numbers

Return on capital
74.14%
total P&L over starting capital
Total P&L
$74,141.72
Closed trades
112
Win rate
67.9%
share of closed trades in profit
vs SPY
-11.13%
excess return over SPY buy-and-hold

The charts

Equity curve (growth of 100)

The takeaway

The strategy returned +74.14% on $100,000 starting capital across 112 closed trades with a 68% win rate. Over the same window SPY buy-and-hold returned +85.28%, so the strategy finished trailing the benchmark by 11.13 points. Best single trade +9.82%, worst -10.74%.

The fine print