AI Backtest

Backtest: Buy MPC at the close when Brent crude closes below its 20-day moving average...

9.26%
Return on capital

The setup has a contrarian logic to it: when Brent crude slides under its 20-day moving average while MPC holds above its own, it hints that product markets are repricing crude weakness — crack spreads widening ahead of the equity. Whether that divergence actually persists is the question trades.run tested, running the plain-English rule bar-by-bar against historical data with $100,000 in starting capital.

The result is a study in nuance. The strategy made 9.26% across 38 closed trades, yet won just 36.8% of the time — while the same capital in SPY returned over 68% across the same window. The thesis produced a positive edge, but a thin one, and it fell badly short of simply holding the market.

The trade-by-trade evidence, the equity curve, and the full comparison are in the analysis below.

The strategy

Buy MPC at the close when Brent crude closes below its 20-day moving average and MPC closes above its 20-day moving average; exit when MPC closes below its 20-day moving average or after 10 trading days, whichever comes first. Refiner strength while crude is below trend shows widening crack spreads, and the divergence tends to persist as product markets reprice crude weakness.

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 MPC at the close when Brent crude closes below its 20-day moving average and MPC closes above its 20-day moving average; exit when MPC closes below its 20-day moving average or after 10 trading days, whichever comes first. Refiner strength while crude is below trend shows widening crack spreads, and the divergence tends to persist as product markets reprice crude weakness.

The key numbers

Return on capital
9.26%
total P&L over starting capital
Total P&L
$9,255.40
Closed trades
38
Win rate
36.8%
share of closed trades in profit
vs SPY
-59.05%
excess return over SPY buy-and-hold

The charts

Equity curve (growth of 100)

The takeaway

The strategy returned +9.26% on $100,000 starting capital across 38 closed trades with a 37% win rate. Over the same window SPY buy-and-hold returned +68.30%, so the strategy finished trailing the benchmark by 59.05 points. Best single trade +17.94%, worst -6.00%.

The fine print