Why this question matters
"Be long above the 200-day average, step aside below it, and size positions by volatility" is probably the most common piece of systematic trading advice. The promise is a similar return with much smaller drawdowns.
We tested exactly that as a candidate for a swing bot on US100, the Nasdaq-100 CFD. We wrote the rule and the pass bars down before computing anything, checked it from several angles, and kept the last two years of data sealed for one final test. This is the story of a model that looked good on Nasdaq-100 in development and then failed the one test that counted.
The rule
- Trend: on daily bars, if the 50-day simple moving average is above the 200-day one, be long; otherwise be flat. No short positions; an earlier long/short momentum portfolio across 17 markets had already failed its out-of-sample test.
- Position size by volatility: a HAR-X forecast of the next day's volatility (a regression of tomorrow's realised volatility on today's, the 5-day and 22-day averages, and implied volatility: VIX for indices, GVZ for gold), refitted every quarter without using future data. The size multiplier is the square root of normal volatility divided by forecast volatility, kept between 0.5 and 2.0. "Normal" is the median of the training data only.
- Execution: decide after the daily close and trade at 16:00 New York, never on the broker's daily rollover bar.
- Costs: our broker's spread by year and hour of the day, 0.5 bp slippage per side, commission, and the overnight swap at the broker's current rate for every year of history. That choice overcharges 2016–2021, when interest rates were near zero, and it overcharges holding more than the rule, which is long less often. So in development it flatters the rule against holding (see Limits).
How we tested it
- Development data. US100 from October 2016 to September 2024 (2,058 days). The start is late because the volatility model needs 750 days of training, and the broker's early index history is too sparse. US500 and gold were run the same way.
- Controls on the same data: always long; always long with the same volatility sizing; the trend filter alone; and the whole rule with its signal delayed by one day, which would expose any peeking at the future.
- Robustness: 27 neighbouring settings (moving averages 40/150, 50/200 and 60/250, three volatility windows, volatility target ±25%), cost × 1.5, a delay of one or two days, and swap at the interest rate of each historical day.
- Other markets: the same frozen model on nine index CFDs, alone and as a portfolio with equal risk per index.
- Risk brakes: ten simple ways to cut exposure in stress (futures positioning from the CFTC, real yields, the VIX futures curve, credit spreads), each against a random cut of the same size.
- The sealed test: October 2024 – September 2026, opened once, with the rule frozen at the centre of the parameter grid and executed the way a bot would trade it, including lot rounding to 0.01. To pass it needed a Sharpe ratio of at least 0.5, no worse than holding the index, a smaller drawdown than holding, and a positive result.
Development results: it looked good
Net of costs, development period.
| Market | Rule: Sharpe / yearly return / max drawdown | Always long: Sharpe / yearly return / max drawdown |
|---|---|---|
| US100 (Oct 2016 – Sep 2024) | 0.96 / +13.7% / −16.8% | 0.73 / +15.1% / −38.1% |
| US500 (Jul 2016 – Sep 2024) | 0.64 / +6.7% / −20.2% | 0.59 / +9.5% / −34.4% |
| Gold (Jul 2011 – Sep 2024) | −0.11 / −2.1% / −60.4% | −0.02 / −1.5% / −58.7% |
Before costs the rule's Sharpe ratio was 1.19 on US100, 0.91 on US500 and 0.25 on gold. On gold the rule lost after costs, mostly because a long gold position pays 5.80% a year in swap at today's rate and the 50/200 filter was whipsawed in 2012–2014 and 2023.
On US100 it passed every robustness check:
| Check (US100, net Sharpe) | Result |
|---|---|
| 27 neighbouring settings | 0.87 to 1.00 (median 0.96) |
| Cost × 1.5 | 0.85 |
| Signal delayed by 1 / 2 days | 0.94 / 0.94 |
| Swap at each day's interest rate | 1.05 |
| 2016–2019 / 2020–2021 / 2022–2024 | 1.12 / 1.18 / 0.62 |
| Trend filter alone, no volatility sizing | 0.88 |
A delayed signal that does not get better is a good sign: no look-ahead. A narrow range across 27 settings means the result is not one lucky parameter.
But one number in the review should have tempered our hopes. Day by day, the rule's return minus the return of always long was negative on all three markets (t between −0.3 and −0.9): the rule did not pick better days to be long. Its higher Sharpe ratio came from cutting exposure in volatile and falling periods. Always long with the same volatility sizing alone scored 0.86 on US100, and the trend filter added the rest. A smaller fixed position could match the rule's drawdown, but not its Sharpe ratio. It was a risk-timing effect, at the price of a lower yearly return, and only fresh data could show whether it would repeat.
Other markets: the first warning
The same frozen model on five indices with long histories:
| Index | Period | Rule, Sharpe (before costs) | Always long, Sharpe (before costs) |
|---|---|---|---|
| US30 | Oct 2016 – Sep 2024 | 0.33 (0.64) | 0.47 (0.68) |
| DE30 | Jul 2015 – Sep 2024 | −0.04 (0.16) | 0.24 (0.40) |
| JP225 | Jul 2016 – Sep 2024 | 0.18 (0.35) | 0.51 (0.64) |
| HK50 | Oct 2017 – Sep 2024 | −0.32 (−0.27) | −0.13 (−0.08) |
| STOXX50 | Jul 2015 – Sep 2024 | −0.18 (0.03) | 0.14 (0.29) |
On every one of them the rule had a lower Sharpe ratio than always long, before costs too, so this was the filter itself, not cost. The pattern by year was consistent: the filter helped in 2018 (+4 to +13 percentage points against holding on all five) and lost in fast rebounds, 2019 (−14 to −23 points on all five) and 2020 (US30 −22, DE30 −26, JP225 −23, STOXX50 −17).
A portfolio of nine indices with equal risk, July 2016 – September 2024, made a Sharpe ratio of 0.37, +3.1% a year and a maximum drawdown of −23.5%. Always long with the same weights made 0.48 and +6.6% a year, and scaled down to the same volatility its drawdown was −19.7%, shallower than the rule's. The portfolio failed its pass bars.
So a bot on US100 alone would have meant choosing the market after seeing the results. We wrote that warning down before the final test.
Risk brakes: none passed the pre-set bar
Between development and the final test we tested ten ways to halve exposure in stress: crowded speculative positioning in the CFTC reports and a sharp rise in 10-year real yields (each on gold, US100 and US500), an inverted VIX futures curve (VIX above VIX3M) and widening credit spreads (each on US100 and US500). None of the ten passed. Two of them were not pure noise: the inverted VIX curve and widening credit spreads reduced the left tail before 2022, but the VIX signal did not help after 2022, and the credit-spread signal on US100, which helped in both periods, missed the statistical bar (placebo p 0.018 against 0.0125). Their effect rested on a few episodes: February and December 2018 and March 2020. One useful observation came from the controls: cutting exposure by half on random days made the left tail worse, not better, compared with simply holding a proportionally smaller position all the time. A risk filter has to beat that before it is worth anything. We will describe these tests in a separate study.
The sealed test: opened once
US100, 30 September 2024 – 4 September 2026 (500 trading days), executed as the bot would trade, net of costs.
| Rule | Holding US100 | |
|---|---|---|
| Sharpe ratio | 0.36 | 0.85 |
| Yearly return | +5.9% | +17.4% |
| Maximum drawdown | −21.4% | −24.3% |
| Average exposure | 0.86 | 0.99 |
| Pass bar | Result | |
|---|---|---|
| Sharpe ratio at least 0.5 | 0.36 | failed |
| No worse than holding | −0.50 | failed |
| Smaller drawdown than holding | −21.4% vs −24.3% | passed |
| Positive result | yes | passed |
Verdict: fail. Without lot rounding the picture was the same (Sharpe 0.33 against 0.85).
Year by year:
| Period | Rule | Holding |
|---|---|---|
| 30 Sep – 31 Dec 2024 | +2.1% | +3.4% |
| 2025 | −2.3% | +16.7% |
| 1 Jan – 4 Sep 2026 | +11.9% | +16.1% |
The rule lost to holding in every period, and 2025 made the difference. Both equity curves bottomed on 7 April 2025. The 50/200 filter switched the position off on 11 April, four days after the low, and switched it back on 23 June. Volatility sizing had already reduced exposure in March (average 0.66), yet the rule took almost the whole February–March fall and then had no position for the April–June rebound. Average exposure was 0.21 in April, 0 in May and 0.30 in June.
The drawdown protection, the main argument for the rule, barely showed up: −21.4% against −24.3%. Holding scaled down to the same volatility had a drawdown of −19.2%, shallower than the rule.
Was it bad luck or a bad rule? Neither can be proven from 500 days. Before opening the data we estimated that, if the development results were representative, the rule had roughly a 53% chance of passing. The shortfall of −0.50 in Sharpe ratio is about 0.8 standard errors from zero. It is also about 1.2 standard errors below what the development results would have led us to expect. What the test does show is that on fresh years the rule did not repeat its advantage over holding. Robustness checks still came out positive (cost × 1.5: 0.26; one-day delay: 0.25), so this was not a cost or timing artefact.
Full disclosure. The first run of the sealed test stopped at a parity check before any result was computed. Some VIX observations shared the same publication time, and the code picked between them inconsistently. We fixed the tie rule (take the latest known value), recorded the fix before computing, and confirmed that it changed nothing in the development weights. We also knew, as everyone did, how the market behaved in 2025; the rule and the pass bars were frozen before the data were opened, and the result was negative.
Why it failed
- Slow exits, slow re-entries. A 50/200 crossover reacts after a fall has happened and re-enters after the recovery has started. In slow bear markets that helps; in V-shaped rebounds, such as 2019, 2020 on several indices and 2025 on US100, it costs a lot.
- Volatility timing did not save it. Exposure was cut in March, after part of the fall had happened, and the trend filter then kept the position out of the rebound.
- Not costs. In the sealed test the rule paid less swap than holding (315 against 365 bp a year), so swap does not explain why it lost to holding.
Swap: the largest cost of swing trading on CFDs
For a swing position on a CFD, the overnight swap (220–460 bp a year in these tests) dwarfs the trading cost (19–42 bp a year). At our broker's current rates a long position pays 3.66% a year in swap on US100, 3.12% on US500 and 5.80% on gold; a short gold position earns 2.74% a year. We checked these rates against account deals and they matched to within about ±5%.
Are futures cheaper? For a long position, barely. Futures have no swap, but the financing is built into the futures price. Measured from futures roll gaps between October 2024 and September 2026, it was about 4.20% a year for Nasdaq futures and 5.08% for gold (single gold rolls ranged from 0.49% to 11.23%, so the gold figure is uncertain). Holding long for 10 sessions cost 14.6 bp on the US100 CFD against 16.5 bp with micro Nasdaq futures, and 23.4 bp on the gold CFD against 20.8 bp with micro gold futures, using a large futures broker's published fees. For short positions futures are clearly better, because the short side receives the financing.
Limits
- One sealed period of 500 days has low statistical power; it can show that a rule failed to repeat its advantage, not that the rule can never work.
- Development swap used today's rate for every year. At each day's rate the rule's US100 Sharpe ratio rises to 1.05–1.09, but holding gains at least as much (+0.13, from 0.77 to 0.90, measured over 2013–2024), so the development advantage over holding does not widen. The sealed test used the broker's current rate, appropriate for a period of high interest rates.
- The tests still used 0.5 bp slippage per side, which our cost review found too high. At swing turnover this matters little: all trading costs together were 19–42 bp a year.
- VIX stood in for Nasdaq volatility (VXN was not in the dataset used for this study).
- The sealed test ends on 4 September 2026, because our price data stopped on 8 September; the last weeks of September 2026 were not computed.
- Interest on free cash, margin requirements and account conditions were not modelled.
- Holding the index is not a strategy with an edge. It is exposure to the market, with a drawdown of −24.3% in the sealed period alone.
Past results do not guarantee future ones.
What it means for a trader
- A trend filter on an index is a risk tool, not a source of edge. It cuts drawdowns in slow declines and costs you in fast rebounds.
- Compare a filtered strategy with holding scaled to the same volatility, not with raw holding. Otherwise you are measuring position size, not skill.
- Robust across parameters is not the same as robust across markets or years. Test on other markets and keep a period you never look at.
- Open a sealed test once. After a fail it is used up for that family of rules: picking a faster average now, after seeing 2025, would be fitting to the answer.
- For swing trades on CFDs, check the swap for your direction before anything else. It can be ten times the trading cost.
Related Lab studies
- Were our backtests too strict? We put our own test engine on trial — how we checked the costs and the swap used here.
- Machine learning on indices and gold: volatility yes, direction no — volatility forecasts and position size after costs.
- Backtest vs live: why our best backtests failed when the bots went live — including a trend model that lost to a plain "always long" control.
- Does the Supertrend strategy work on gold? — another trend rule tested as published.
Written and reviewed by AI agents (Claude and Gemini models) under rules set by the owner; no person reviews each text. Last AI review: 25 Oct 2026. Sources are listed at the end of the article.