r/mltraders • • 8h ago

Tutorial Your forex model might be using employment numbers nobody knew at the time

24 Upvotes

A surprisingly easy mistake when building macro features is downloading historical economic data and assuming those were the figures traders originally saw.

FRED generally provides the latest available revisions.

ALFRED lets you retrieve earlier versions of those same economic series.

Imagine a US employment report initially shows 180,000 new jobs, then gets revised to 120,000 a month later.

Those figures are hypothetical but the problem is real.

If a model training on EURUSD reactions uses the revised 120,000 figure as though it was available on the original release morning, it's learning from information that arrived later.

The EURUSD movement visible on moon .com would reflect the market's reaction to information available at the time, not the revised number.

Even a perfectly chronological train and test split won't fix that.

I'd store the original release timestamp and the data vintage alongside every macro observation.

Otherwise a model can end up predicting reactions using numbers the actual market never had.

Pretty nasty source of false accuracy when you're testing news driven strategies."


r/mltraders • • 2h ago

ScientificPaper Backtested 108 VIX threshold rules for timing VTI against monthly DCA. The winner beat DCA out of sample, and I still don't believe it. Poke holes in this.

0 Upvotes

I tested whether VIX levels can time entries and exits in VTI, with a development/holdout split, explicit dividends and tax lots. Looking for criticism of the methodology.

Setup

- Dec 2016 to Nov 2026, daily data (VTI from Yahoo, VIX from Cboe, 3-month Treasury yield from FRED for idle cash)

- $2,083.33 contributed on the first trading day of each month ($250k total), Roth IRA first up to the annual limit, the rest to a taxable account

- Rule: buy everything when VIX closes at or above X, sell everything when it closes at or below Y, executed at the next day's close

- Grid: buy 20/25/28/30/35/40, sell 12/15/18/20/25, 1- or 2-day confirmation, optional 200-day SMA filter. 108 rules.

- Ranked on Dec 2016 to Dec 2021, then run unchanged on Jan 2022 to Nov 2026

- Dividends paid on ex-date and reinvested, tax lots tracked individually (15% dividends and long-term gains, 24% short-term gains and interest), no commissions or slippage

Result

The top rule in development was buy at VIX >= 30, sell at VIX <= 12.

| | Monthly DCA | VIX 30/12 |

|---|---|---|

| Ending value (after tax) | $515,925 | $546,432 |

| TWR, full period | 13.98% | 14.58% |

| TWR, holdout | 9.90% | 10.47% |

| Max drawdown | -35.0% | -29.5% |

| Trades | 0 | 7 |

| Days invested | 100% | 78% |

Why I don't trust it

  1. The whole edge comes from three exits: mid-2018 (VTI fell 15.3% while out), Nov 2019 to Feb 2020 (fell 5.5%), and May to Aug 2024 (fell 1.5%).
  2. The holdout edge is one round trip. VIX closed at or below 12 on only four days in the entire holdout, with a low of 11.86. A sell threshold of 11.8 produces zero holdout trades and a return identical to DCA.
  3. It's the best of 108. Only 8 rules beat DCA in development. In the holdout, 23 beat it, 12 tied (no trades) and 73 lost. The median rule ended at $403,420 with a 7.55% holdout TWR.
  4. It's fragile. Adding a second confirmation day to 30/12 drops it to $524,215. None of the 54 rules with the SMA filter beat DCA.
  5. The rule sat in cash for the first 14 months and missed a 24.8% rally. That only looks harmless because the balance was tiny.

Two other things I checked

- Buy-only version (hold back 25/50/100% of each contribution, deploy when VIX hits 20/25/30/35, never sell): all 12 variants lost to DCA, by $861 to $14,958.

- Dividends are not what separates the strategies. The 30/12 rule gave up $907 in dividends and earned $4,963 in cash interest. Capital-gains tax is the real drag ($11,059), cutting the pre-tax edge from about $51k to $30.5k.

What I'd like feedback on

- Is there any sensible way to assess a rule with three exits in ten years, or is this simply untestable on this sample?

- Better validation design than one split? I'm thinking walk-forward on VIX history back to 1990 with a different total-market proxy.

- Anything wrong with next-day-close execution or ex-date dividend reinvestment that would bias this?


r/mltraders • • 12h ago

recommendation for trading bots

Thumbnail reddit.com
1 Upvotes

Hey, does anyone have experience with a good trading bot that made a good return?


r/mltraders • • 15h ago

New to the group

2 Upvotes

Hi everyone. I hope you’re all doing well.
I’ve personally been trading the last 7 years. But for the last 6 months I’ve been building my own forex platform, which acts as a sandbox for walking forward strategies. And monitoring them.
Recently, I got into utilizing game theory, as well as machine learning. I’m using clause to help me through it.
Does anyone have any tips, advice, articles/books I can feed Claude to obtain the best results?