AI Backtest

Backtest: Buy APA at the close when it closes in the bottom 20% of its 20-day closing r...

156.10%
Return on capital

Seventy percent of the trades worked. That is the headline number from a surprisingly clean mean-reversion system on APA, a name where energy traders habitually buy beaten-down stock to get ahead of the next oil rebound. The rule is straightforward: buy at the close when APA lands in the bottom 20% of its 20-day closing range, then exit on a close in the top 20% or after ten trading days, whichever comes first. Across 37 closed trades, the strategy turned $100,000 into roughly $256,000 — a 156.1% return on capital.

The benchmark comparison matters just as much. SPY buy-and-hold returned 68.3% over the same window, which puts the strategy's edge at 87.8 points. The path was not smooth — the best trade gained 14.0% and the worst lost 12.3% — so the win rate and the drawdowns deserve equal attention. The full breakdown below walks through the equity curve, the trade-by-trade results, and where this dip-buying edge actually came from.

The strategy

Buy APA at the close when it closes in the bottom 20% of its 20-day closing range; exit when it closes in the top 20% of that range or after 10 trading days, whichever comes first. Mean reversion in E&Ps is strong because energy traders buy beat-up names to position for the next oil rebound.

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 APA at the close when it closes in the bottom 20% of its 20-day closing range; exit when it closes in the top 20% of that range or after 10 trading days, whichever comes first. Mean reversion in E&Ps is strong because energy traders buy beat-up names to position for the next oil rebound.

The key numbers

Return on capital
156.10%
total P&L over starting capital
Total P&L
$156,101.73
Closed trades
37
Win rate
70.3%
share of closed trades in profit
vs SPY
87.80%
excess return over SPY buy-and-hold

The charts

Equity curve (growth of 100)

The takeaway

The strategy returned +156.10% on $100,000 starting capital across 37 closed trades with a 70% win rate. Over the same window SPY buy-and-hold returned +68.30%, so the strategy finished beating the benchmark by 87.80 points. Best single trade +14.03%, worst -12.28%.

The fine print