Backtest: Buy BP at the close when its 5-day total return underperforms XLE's by more t...
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.
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
The charts
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
- Simulated results on historical data — fills, slippage and costs are idealized.
- Past performance does not predict future results.