Energy pays the trader, not the holder

Energy is the sector investors buy for a reason, then regret for a decade. XLE spent three years between roughly $38 and $49, and a buy and hold position from January 2023 to January 2026 returned about six percent. Then came 2026. War with Iran pushed crude higher in March, XLE ran to a new high in early April, gave the whole rally back by late June, and then climbed to a fresh high in August.

That is two different problems in one ticker. A long sideways range that pays nothing for patience, and a geopolitical spike that punishes anyone who bought the headline. This study shows how one algorithm handled both, and a third window that let it trade the full stretch at a slower pace.

Trading the war

2026 year to date, daily chart, the war recipe

Strategy

+48.2%

Buy and hold
+36.9%
DCA
+14.8%

Trading the range

2023 to 2025, daily chart, the range recipe

Strategy

+70.2%

Buy and hold
+6%
DCA
+1.2%

The patient trade

2023 to August 2026, weekly chart, the patient recipe

Strategy

+102.8%

Buy and hold
+45.4%
DCA
+40.6%

All scenarios start from $100,000 cash and zero shares.

Backtested results. Past performance does not guarantee future results. For educational purposes only.

The subject

XLE, the energy sector in one ticker

XLE is the State Street Energy Select Sector SPDR ETF. It holds the energy names in the S&P 500, dominated by the integrated oil majors, and trades on NYSE Arca with deep liquidity. It is how most investors own oil without owning oil.

The recent history, in levels that matter:

  1. Early 2023XLE opens the year in the mid 40s after the 2022 energy run.
  2. 2023 through 2025The fund oscillates between roughly $38 and $49, touching the low end in mid 2023, early 2024, and spring 2025.
  3. January 2026Still in the mid 40s. Three years, no progress.
  4. March 2026War between Iran and the US and Israel begins, crude jumps, XLE breaks out.
  5. Early April 2026XLE peaks above $60 as the war peaks; a ceasefire is announced April 8.
  6. Late June 2026XLE falls back to about $54, below where it sat when the fighting started. The rally is erased.
  7. August 2026A second leg higher to above $64, then a pullback to about $62 by August 25.

Here is the catch that matters for this study. XLE rewarded no one for holding through 2023 to 2025, then rewarded almost no one for buying the 2026 headline. The gains in both stretches went to whoever bought the dips and sold the rips. Nearly nobody does that by hand.

Market Wave Algorithm for ETFs

The algorithm

Ride confirmed moves

Entries wait for price to move a set percentage in the algorithm's favor before committing capital, so the algorithm buys weakness and confirms it.

Exit on rules, not nerves

Exits trigger at a preset profit threshold and, in two of these recipes, on a confirmed change of trend.

Step aside in chop

The Market Wave ribbon sets scope. Buy filters and sell filters keep the algorithm out of trades the ribbon does not support.

One algorithm, three recipes. The 2026 recipe is fast: tight entry and exit thresholds, near-full position sizing, a trend-break sell. The 2023 to 2025 recipe is built for a range: half-size entries, a wide scope of 13, and a rule to buy only below the ribbon. The weekly recipe is the patient one: wide 5.3% and 5.8% thresholds, full-size entries, one signal set per week. Same discipline, three different jobs.

Backtested results. Past performance does not guarantee future results. For educational purposes only.

Three windows, one discipline

XLE results by scenario
2026 YTD, daily2023 to 2025, daily2023 to 2026, weekly
Strategy return+48.2%+70.2%+102.8%
Buy and hold+36.9%+6%+45.4%
vs buy and hold+11.3 pts+64.3 pts+57.5 pts
DCA+14.8%+1.2%+40.6%
vs DCA+33.4 pts+69 pts+62.2 pts
Ending value$148,200$170,220$202,843
Realized profit$31,657$62,810$100,439
Shares held2,3713,781327
Average cost basis$55.51$42.75$56.29
Cash$36$1,172$182,032

The column to study is the middle one. Buy and hold earned 6% in three years. The algorithm earned 70.2% in the same three years on the same fund, because a range is not nothing to a system that sells the top of it and buys the bottom. The other two columns show the same discipline working when the fund finally moved.

Backtested results. Past performance does not guarantee future results. For educational purposes only.

What XLE teaches about every sector trade

  1. 01

    A sideways market is a paycheck, not a waiting room

    Three flat years paid 6% to the holder and 70.2% to the algorithm. Range-bound is where rules beat conviction by the widest margin.

  2. 02

    The headline is not the trade

    Buying the war in April 2026 lost money by June. Selling into it, on a rule set before the war, banked $31,657 and bought the dip.

  3. 03

    Cash near the highs is a position

    Ending the weekly window with $182,032 in dollars is not timidity. It is the algorithm doing its job while the holder hopes.

The client decision: what job do you want the algorithm doing on a sector you already believe in? Trading the range, trading the spike, or trading both at a weekly pace. The recipe follows the answer.

Backtested results. Past performance does not guarantee future results. For educational purposes only.