AI Backtest

Backtest: Buy VLO at the close when its 5-day return exceeds XLE's 5-day return by more...

22.86%
Return on capital

Relative strength is one of the oldest momentum signals in the playbook. The version tested here is narrower: buy Valero at the close when its five-day return has beaten the energy sector's five-day return by more than two percentage points, then exit five sessions later. The logic is that a refinery-specific pop — not just a rising oil tape — hints at widening crack spreads and momentum the broad sector hasn't yet priced.

Across 62 closed trades, the rule turned $100,000 into roughly $122,859, a 22.86% cumulative return. The win rate was just 43.5%, however, and a passive SPY position grew about 68% over the same window, beating the strategy by 45 points. The chart breakdown below shows where the edge actually surfaced, how it decayed across trade sequences, and how the best and worst fills shaped the final curve.

The strategy

Buy VLO at the close when its 5-day return exceeds XLE's 5-day return by more than 2 percentage points; exit after 5 trading days. Thesis: Relative strength in Valero over the sector signals widening crack spreads, driving short-term momentum continuation.

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 VLO at the close when its 5-day return exceeds XLE's 5-day return by more than 2 percentage points; exit after 5 trading days. Thesis: Relative strength in Valero over the sector signals widening crack spreads, driving short-term momentum continuation.

The key numbers

Return on capital
22.86%
total P&L over starting capital
Total P&L
$22,859.28
Closed trades
62
Win rate
43.5%
share of closed trades in profit
vs SPY
-45.44%
excess return over SPY buy-and-hold

The charts

Equity curve (growth of 100)

The takeaway

The strategy returned +22.86% on $100,000 starting capital across 62 closed trades with a 44% win rate. Over the same window SPY buy-and-hold returned +68.30%, so the strategy finished trailing the benchmark by 45.44 points. Best single trade +13.41%, worst -9.24%.

The fine print