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 • • 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?


r/mltraders • • 1h ago

An AI written backtest can only cheat with hindsight if the model touches the candles while the test runs

1 Upvotes

The most common doubt I get about using an LLM to backtest is that the model already knows what happened. It was trained on data that includes 2024, so how can a 2024 backtest mean anything?

That worry is real when the model is making the trade decisions during the test. If you hand it each candle and ask buy or sell, it can lean on what it remembers about that week, and nothing in the output will tell you it did.

It goes away when the model only writes the rules. In Agenticks the model turns what you typed into fixed entry, exit and sizing rules as code, and then a separate replay walks the historical candles one at a time with the rules already frozen. The model never sees a candle during the run, so its training cutoff has nothing to leak into.

The place hindsight can still sneak in is the human, which is the part people skip. If you run it, look at the equity curve, change the stop, run it again, and keep going until 2024 looks good, you have done the overfitting yourself and the model was never involved. A strategy that took 15 tweaks to look good on one window has mostly learned that window.

What I check before trusting a run is whether the rules would read the same if I had written them down before seeing any result, and whether the numbers hold on a stretch of data I didnt touch while tweaking, since that second window is the closest thing to live a backtest gets.


r/mltraders • • 8h ago

What should an AI trading system learn from a losing trade?

1 Upvotes

I’m building Indomitable, and one of the hardest questions comes after a loss. Looking back, it’s usually easy to spot a reason to wait. But could the system have seen that reason before it bought?

That’s what I’m working on. Indomitable records what it knew when it made a decision. After the market closes, it can revisit that decision and test a possible lesson against later trades. What I want to see is whether that lesson helps it make a better choice the next time.

Here’s a short look inside the app. If you could open up one trade and ask Indomitable to explain one thing, what would you ask? indomitableglobal.com


r/mltraders • • 9h ago

Suggestion How To Build a Prediction Market Trading Bot: Kalshi, Polymarket US, Novig and ProphetX

Thumbnail reddit.com
1 Upvotes

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 • • 13h ago

Are there people manage multiple algo strategies across different F&O segments(stocks, index, commodities & for scalp, intraday, swing, positional & hedging) and market regimes (like high & low volatility, different even, bear & bull market etc)?

Thumbnail reddit.com
1 Upvotes

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?