How to Algo

Does Your Strategy Work Every Year? Testing Regimes

Every year, both sides, both halves: simple checks for regime dependence, how to spot one year carrying the P&L, and when to disclose a regime instead.

Part 15 of 20 · How to Algo · Previous: Overfitting and robustness · Next: Why filters make strategies worse

A seven-year backtest total is a sum, and sums hide their parts. The same +$100,000 can be fourteen thousand a year for seven years or ninety thousand in one year and nothing in the rest. Those are different strategies. The first is a mechanism; the second is a bet that one market episode repeats.

So after a strategy passes costs, significance, placebos and a holdout, we break it into pieces: every year, both sides, both halves. Where it stops working, we want to know why, and we want to write that down for anyone who trades it.

The point of this part is evaluating a strategy across regimes, not predicting the next one. In the simulated table below, eight years of monthly returns give t = 3.21, a result most people would trade. One year, year 4, makes 55% of the total; without it, t is 1.70.

Simulated calendar heatmap of monthly returns over eight years with yearly totals; year 4 alone makes 55% of the total, and t drops from 3.21 on all 96 months to 1.70 without it

The every-year table

The first view is a table: one row per calendar year with trades, net P&L, win rate and average trade. Then four numbers:

  • Green years out of total years.
  • Share of total P&L from the best year.
  • t-statistic without the best year.
  • Worst year in dollars, compared with the backtest’s maximum drawdown.

What a fragile result looks like: our test of an Asian-session sweep reversal on NQ made 78% of its total P&L in a single year, 2022. Without 2022 its t-statistic fell to +0.32. The full-period number looked like an edge; the year table showed an episode.

What “every year green” actually means: our NQ RSI-2 dip-buying test was positive in every year from 2019 through 2026, including the 2022 bear market. When we ran the identical rule on twelve years of ES, two years were red: 2015 at −$2,450 and 2018 at −$11,032. “Positive every year” had been a property of the window, not of the rule. The twelve-year ES test is the honest version, and the rule still survived. Longer history is the cheapest regime test there is.

Both sides

For any strategy that can be long or short, split the result by side. On an index that rose for most of the sample, the long side of almost any rule makes money. A symmetric rule with an asymmetric result is usually capturing drift.

The same Asian sweep: longs (after the session low was swept) made +$97.3 a trade, shorts (after the high was swept) lost $12.7 a trade. Same rule, mirrored. And random entries in the same nights with the same geometry made $36 a trade. The “reversal” was mostly being long at night.

Two checks follow from this:

  • Compare each side with the unconditional drift over the same holding windows.
  • Compare the long side with always-long at the same exposure. If always-long does as well, the signal is not adding anything.

Both halves

Part 13 covers holdouts. In this context the split is also a regime check: if the first half and the second half differ in sign, the strategy belongs to one of them. The strongest result we have published, ES RSI-2, had all twenty parameter cells positive in both halves of the window. That is the standard we now hold every candidate to.

Normalise for volatility before comparing years

Dollar results over many years are dominated by the most volatile years, because a fixed number of contracts makes and loses more dollars when ranges are wide.

Gold is the extreme case in our data: its price more than tripled from 2019 to 2026. A one-contract strategy on GC makes and loses several times more dollars per move in the later years than in the earlier ones. When we ported our rule families to gold, several looked positive in raw dollars and reversed sign between training and holdout once we divided P&L by a trailing 60-day median dollar range. The raw results were volatility, not edge.

The fix is easy: alongside the dollar table, compute each year’s P&L in units of that year’s typical dollar range (or ATR times point value), and judge stability on that column. Part 17 takes the same idea into sizing.

Regime dependence can be legitimate

Some edges are regime-dependent by mechanism. Dealer gamma is the clearest example in our data: after a negative-gamma session, the next ES cash session ranged 66.47 points on average, against 38.74 after a positive one (the gamma volatility study). A strategy that profits from movement will do better in one regime than the other, for a reason you can state in advance.

One of our live paper sleeves is built on that kind of mechanism, and its public description says so: in the seven-year backtest it was dormant to negative in 2019–2021 and then had five straight green years once the short-gamma period began in 2022. The disclosure ends with “if the regime leaves, so does the edge”. That is the right way to ship a regime-dependent strategy: name the regime, show the years it did not pay, and define in advance what would mean the regime is gone (Part 20 covers retirement rules).

The wrong way is to discover the regime afterwards and add a filter that switches the strategy off in the bad years. That filter is fitted to the bad years by construction. Our test of the popular trend-day versus reversion-day filter on ES found trend days repeated 30.0% of the time against a shuffled control of 33.3%: below its own placebo (the regime filter test). Regimes are easy to see in hindsight and hard to forecast; a hidden Markov regime model on NQ looked brilliant only while it could see the future.

A regime story can be a bug

The most uncomfortable lesson we have here is about our own engine. Before we found the fill-selection bug described in Part 6, our ES trend pullback showed four losing years at the start of the sample and nine green years after. It looked like a regime story: the strategy “started working” when the market changed. We had an explanation ready.

Corrected, all thirteen years were red, with a constant drain of roughly $24 a trade. There was no regime. The pattern in the year table had been produced by the bug. A plausible regime explanation is not evidence; it is a hypothesis, and it needs its own test.

Fixed-point brackets create fake regimes

Another way to manufacture a regime: brackets in fixed points on an instrument whose volatility changes. The NQ VWAP drift strategy from Part 9 is the example: its capped target and fixed-point stop let losses grow with volatility while wins could not. The win rate it needed to break even rose from 58.8% in 2020 to 63.2% in 2026, so its margin over break-even shrank almost every year, from +3.3 percentage points in 2020 to +0.9 in 2025, and turned to −4.8 in 2026 through August. The “regime change” was partly a parameter that did not scale.

Bar chart of the NQ drift-VWAP pullback's actual win rate minus its break-even win rate by year: +3.3 points in 2020 shrinking to +0.9 in 2025 and -4.8 in 2026 to August

Checklist

  1. Print the every-year table: trades, P&L, win rate, average trade.
  2. Report green years, best-year share, t without the best year, and the worst year.
  3. Split by side; compare each side with drift and with always-long.
  4. Require both halves of the sample to have the same sign.
  5. Normalise yearly P&L by that year’s dollar volatility before judging stability.
  6. Extend the history whenever you can; earlier years are a free regime test.
  7. Disclose regime dependence with its mechanism and its losing years.
  8. Do not fit a filter to switch off the bad years after seeing them.
  9. Treat a regime story as a hypothesis to test, not an explanation.

Adding a filter to skip bad periods is the most common way traders try to fix a regime problem, and usually the most expensive. Part 16: Why filters make trading strategies worse.

Frequently asked questions

Should a trading strategy be profitable every year?

Not necessarily, but you should know which years carry it and why. A strategy that loses in some years for a stated, mechanical reason can be fine. A strategy whose total comes mostly from one year is a bet on that year repeating. On NQ, an Asian-session sweep we tested made 78% of its total in 2022; without 2022 its t-statistic was 0.32.

What does it mean if one year makes most of the profit?

That the strategy may depend on an episode rather than a mechanism. Report the share of total profit from the best year and the t-statistic with that year removed. In our simulated example, one year of eight made 55% of the total, and t fell from 3.21 on all 96 months to 1.70 without it.

Why test the long and short sides separately?

Because a symmetric rule with an asymmetric result usually means the profit is market drift. On a rising index, the long side of almost anything makes money. In our NQ sweep test, longs made $97.3 a trade and shorts lost $12.7 under the same rule, which is the signature of drift capture rather than of a signal.

What is a regime-dependent strategy?

One whose edge exists only in certain market states, for example high volatility or negative dealer gamma. That is acceptable if the dependence is mechanical, measured and disclosed. One of our live paper sleeves is described publicly as a regime sleeve: dormant to negative in 2019 to 2021 and positive in every year since the short-gamma period began in 2022.

Do I need to adjust for changing volatility across years?

Yes, whenever the instrument's dollar volatility changed a lot. Gold more than tripled from 2019 to 2026 in our data, so a fixed one-contract strategy makes and loses several times more dollars per move in the later years. Normalising P&L by a trailing measure of dollar range before comparing years is the minimum.

Keep reading

How to Algo

Backtest vs Live Trading: Reconciling Every Trade

Why live trading drifts from the backtest: fills, latency, data gaps, rolls and code divergence. How to replay your live engine and reconcile trade by trade.

How to Algo

Tick Data vs Bars: What Resolution Your Algo Needs

Daily bars, minute bars, ticks or order-book depth? Match data resolution to the decision your algo makes, and see what a bar hides about stops and targets.