AI Backtest

Backtest: Buy BP at the close when its 5-day total return underperforms XLE's by more t...

8.00%
Return on capital

On its own terms, this strategy worked. Eight percent on capital across 13 closed trades, two out of three winners, a best trade of nearly 4%. The rules — buy BP when it lags XLE badly, but only while Brent sits above its 50-day — captured a real mean-reversion pattern in large-cap energy.

Then the benchmark steps in. Over the same span, SPY buy-and-hold returned more than 68%, leaving this trade-by-trade approach 60 points behind. That gap is the whole story: the signal was profitable and the win rate was healthy, yet the opportunity cost of being out of the broad market dwarfed the edge.

The evidence below runs through the full dataset — every entry and exit, the winning and losing trades, and the precise moments where the pattern held up and where it didn't.

The strategy

Buy BP at the close when its 5-day total return underperforms XLE's by more than 3 percentage points while Brent crude closes above its 50-day moving average; exit when BP's 3-day total return outperforms XLE's by at least 1 percentage point or after 5 trading days, whichever comes first. A supermajor lagging the energy sector in a firm crude tape marks a relative-value air pocket that tends to close as sector flows rotate back into large-cap energy.

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 BP at the close when its 5-day total return underperforms XLE's by more than 3 percentage points while Brent crude closes above its 50-day moving average; exit when BP's 3-day total return outperforms XLE's by at least 1 percentage point or after 5 trading days, whichever comes first. A supermajor lagging the energy sector in a firm crude tape marks a relative-value air pocket that tends to close as sector flows rotate back into large-cap energy.

The key numbers

Return on capital
8.00%
total P&L over starting capital
Total P&L
$7,999.77
Closed trades
13
Win rate
66.7%
share of closed trades in profit
vs SPY
-60.30%
excess return over SPY buy-and-hold

The charts

Equity curve (growth of 100)

The takeaway

The strategy returned +8.00% on $100,000 starting capital across 13 closed trades with a 67% win rate. Over the same window SPY buy-and-hold returned +68.30%, so the strategy finished trailing the benchmark by 60.30 points. Best single trade +3.86%, worst -3.56%.

The fine print