Why this question matters
"AI that predicts the market" is one of the most common promises in retail trading. We wanted a clean answer for our own bots, not a sales line: if we train a modern model properly, on good data, with real costs and no tricks, does it find the direction of an index or of gold within the day?
This was not our first attempt. In September 2026 a model trained on raw price direction ended up forecasting "long" 100% of the time, while breaking even would have needed a hit rate of 52.08%. Earlier still, an apparent machine-learning edge turned out to be a timezone error (see the related studies below). This time we changed what we could change: costs measured on our own account, more information than price alone, two model types, fixed settings, and a plan written before anything was computed.
The short version: the model learned something real, but it was volatility, not direction.
Data
- Prices: 1-minute data from Dukascopy, 2012–2020.
- Decisions: every 30 minutes during the cash session: 10:00–15:30 New York for US100 and US500, 08:50–13:20 New York for gold. That gives 21,953 decisions on US100, 21,695 on US500 and 20,547 on gold.
- Execution: entry at the open of the next minute; exit when the forecast changes sign, at a stop of 0.5 × ATR, or at the end of the session.
- 37 features in seven groups, each known before the decision:
- Returns over 5–120 minutes, since the open, the overnight gap, the hour before the open and the previous session.
- Realised volatility: last 30 minutes, since the open, relative to 20 days, ATR and range.
- Position relative to intraday range bands, TWAP and VWAP.
- Calendar: hour, weekday, Fed decision, CPI and payrolls days, minutes since the last and until the next major US release.
- Implied volatility: VIX, VIX/VIX3M, the change in VIX, VXN for US100 and GVZ for gold, each from its publication time.
- A second market: US500 for US100 and vice versa; 2-year Treasury futures and 10-year real yields for gold.
- Futures: order-book imbalance in Nasdaq and gold futures over 15 and 60 minutes, and the 30-minute change in the futures–CFD basis.
Two gaps in the data: there was no intraday dollar index, so 2-year Treasury futures and real yields stood in for it, and there was no S&P 500 futures order book, so US500 used the Nasdaq one.
Cost. Before training we rebuilt the cost model from our account: spread by hour from 671 bot order legs, commission and slippage from account deals, and swap at the interest rate of each historical day. The median difference between model and account was at most 0.03 bp per leg on five instruments; swap amounts matched with a ratio of 0.77–1.06. Two findings along the way: gold commission is a percentage of position value (0.35 bp per side), not a fixed amount per lot, and our broker's index spreads in points rose with the index level over the years. So historical costs in bp were largely real, not inflated, and the idea of "fixed points" was wrong.
| Average cost per trade (bp, round trip) | Account cost model at historical prices | Cautious, × 1.5 (used for decisions) | At today's prices |
|---|---|---|---|
| US100 | 1.09 | 1.63 | 0.61 |
| US500 | 1.59 | 2.39 | 1.38 |
| Gold | 2.34 | 3.50 | 1.20 |
Method
- Plan first. The hypotheses, settings, pass bars and controls were written down and committed before any result was computed. So were the code and its tests. The last two years of data (October 2024 – September 2026) were sealed and stayed closed.
- Two models on the same features: a LightGBM regression forecasting the return to the end of the session, and a LightGBM classifier forecasting its direction. Two fixed parameter sets, A and B, chosen in advance. Nothing was tuned on results.
- Walk-forward: each year was forecast by a model trained on all earlier years from 2013, with a one-day gap between training and test. The out-of-sample years were 2015–2020.
- Trade rule: trade only when the forecast return after the cautious cost is above zero and the classifier agrees on the direction.
- Pass bars included: net result above zero with t ≥ 2.0 (the main hypothesis, US100 with set A, needed p < 0.025 one-sided), at least 4 of 6 years positive, and four controls: a random choice of trades repeated 999 times, all features delayed by one minute, a leak alarm (profit factor above 2.5 or hit rate above 65%), and a check that the important features make sense.
- Engine test before computing: an injected feature was found and ranked first; pure noise gave no edge; changing prices after a decision did not change the features; training always ended at least one day before the test.
- Validation on 2021–2024 was to be computed only if the development years passed.
Result: direction
Out of sample, 2015–2020, cautious cost.
| Model | Trades | Before costs (bp) | Net, measured cost (bp) | Net, cautious cost (bp) | t | Positive years | Profit factor | Hit rate |
|---|---|---|---|---|---|---|---|---|
| US100, set A (main) | 1,975 | +1.89 | +0.81 | +0.26 | 0.16 | 3/6 | 1.01 | 46% |
| US100, set B | 2,299 | +2.14 | +1.06 | +0.52 | 0.38 | 3/6 | 1.02 | 49% |
| US500, set A | 1,779 | −1.21 | −2.80 | −3.60 | −2.40 | 1/6 | 0.84 | 43% |
| US500, set B | 2,132 | −0.14 | −1.72 | −2.52 | −1.94 | 1/6 | 0.88 | 45% |
| Gold, set A | 1,703 | +0.33 | −2.01 | −3.18 | −3.30 | 1/6 | 0.80 | 42% |
| Gold, set B | 2,095 | +0.90 | −1.45 | −2.62 | −3.13 | 1/6 | 0.83 | 43% |
| Linear model, US100 (baseline) | 2,146 | +0.83 | −0.26 | −0.80 | −0.52 | 3/6 | 0.97 | 47% |
The main hypothesis failed: a one-sided p-value of 0.44 against the 0.025 required. Following the plan, the second family of tests and the 2021–2024 validation were not computed.
US100 year by year (model A, measured cost):
| Year | Trades | Before costs (bp) | Net (bp) |
|---|---|---|---|
| 2015 | 415 | −2.15 | −3.24 |
| 2016 | 365 | +0.52 | −0.56 |
| 2017 | 305 | +0.80 | −0.28 |
| 2018 | 332 | +5.72 | +4.63 |
| 2019 | 225 | +6.48 | +5.40 |
| 2020 | 333 | +2.51 | +1.42 |
| Total | 1,975 | +1.89 | +0.81 |
All of the gain comes from 2018–2019; in 2015–2017 the model lost. A trivial comparison makes the point: simply being long during the session earned +0.93 bp per trade at the measured cost (t 0.39), about the same as the model, with no model at all.
Was the test able to see an edge? With these sample sizes, the smallest edge the test could detect with 80% probability was 4.5 bp per trade on US100, 4.2 bp on US500 and 2.6 bp on gold. The US100 results are 5–15 times smaller than that, and on US500 and gold the estimate is clearly below zero. So on US100 "fail" means "not proven"; on US500 and gold it points to a loss.
Controls. A random choice of trades did as well as the model (p 0.22 for US100 A, 0.13 for B, 0.93 for US500 A, 0.45 for gold A). There was no sign of leakage (no profit factor above 2.5, no hit rate above 65%), and delaying every feature by one minute did not destroy the small US100 result, so the code was not peeking.
What the model actually learned
We measured how much the out-of-sample information coefficient (IC, the correlation between forecast and outcome) falls when each feature is shuffled.
- US100: the previous session's return, ATR, VXN, minutes until the next major release, and the 30-minute return of US500.
- Gold: the move in the hour before the COMEX open, the position relative to an intraday range band, ATR and session volatility.
- By group: price and volatility carried most; futures order-book imbalance and basis contributed negatively on every market; implied volatility was mixed.
The out-of-sample IC was 0.00–0.07. The model was mostly reading the level of volatility and the market's drift, not where price would close.
The futures data deserved its own test. On a 60-minute horizon (gold 2013–2020, US100 2014–2020) we asked whether futures basis and top-of-book data improve a forecast built from CFD prices alone. The improvement per decision was +0.0007, −0.016, +0.014 and −0.041 bp (t between −0.63 and 0.42), while the test could have detected about 0.7 bp on gold and 1.0 bp on US100. The correlation between forecast and outcome was 0.006–0.023. That is not trading information.
What machine learning can predict: volatility
Volatility clusters: calm days tend to follow calm days, and busy days follow busy days. That makes it far more predictable than direction. We tested it head-on for the next US100 session, out of sample for 2014–2020, with fixed settings and yearly retraining.
- Target: realised volatility of the next session, from 5-minute returns.
- Baseline: HAR-RV, a simple regression on yesterday's, last week's and last month's volatility.
- LightGBM: the same inputs plus implied volatility (VIX, VXN and the change in VIX), recent returns, ATR, the calendar of major releases and the weekday.
| Forecast of next-session volatility, US100 (log, out of sample) | R² | Correlation |
|---|---|---|
| HAR (simple model) | 0.65 | 0.81 |
| LightGBM | 0.63 | 0.80 |
Both explain roughly two thirds of the variation, and in forecast accuracy the simple textbook model was as good as machine learning. LightGBM relied mostly on yesterday's volatility (50% of its importance).
Can a volatility forecast make money? The obvious use is position size: smaller when the forecast is high, larger when it is low. In our backtests, sizing by the volatility forecast did not improve results after costs. We leave out the details because they concern strategies now running in forward tests on our account. One general point holds for any small account: with a 0.01 lot step, a sizing model often has only one or two lot sizes to choose from, so check what your broker can actually execute before relying on it.
What did not work, and why
- Direction: we found no evidence that price, volatility, implied volatility, the calendar, a second market or one-minute futures order-book data contain enough information about where the session will close to cover a round trip of 1.1–2.3 bp. On US100 that means "not proven" (the test could detect 4.5 bp); on US500 and gold the estimate was clearly negative.
- The small US100 gain came from two years and matched simply being long during the session.
- Volatility sizing: volatility was predictable, but in our backtests sizing by it did not improve results after costs.
What we will not do: keep trying deeper networks or more features for intraday direction on these same inputs until something looks good. That would be fitting after the fact. The condition for reopening this question is a new source of information, for example option positioning with exact timestamps or full order-book depth, both of which are paid data.
Limits
- Prices come from Dukascopy, not from our broker; costs come from our account. The development years were 2012–2020. The 2021–2024 validation was not computed and the sealed 2024–2026 period was not opened, so nothing here describes recent years.
- We used two fixed parameter sets and did not tune. Whether some other model would do better out of sample is not verified.
- There was no intraday dollar index and no S&P 500 futures order book.
- Costs were measured in 2026 and converted to historical prices. For indices before February 2021, where broker data are missing, we used the cost in bp of the first year of data, about 1.0 bp round trip on US100.
- The volatility study covers 2014–2020 only and one target, the next US100 session.
Past results do not guarantee future ones.
What it means for a trader
- Treat "AI predicts direction" claims with care. Ask for out-of-sample results after costs, year by year, and compared with simply holding the market for the same hours.
- Volatility is forecastable, and a simple model forecast it as accurately as machine learning. Use it to understand risk, such as how wide a stop has to be or what a normal day looks like, not as a source of edge.
- Always include a trivial baseline. Here, "long during the session" matched the model.
Related Lab studies
- Were our backtests too strict? We put our own test engine on trial — why the cost used here is the cost measured on our account.
- A timezone error that faked a machine-learning edge — an earlier "edge" that was a data bug.
- Backtest vs live: why our best backtests failed when the bots went live — machine-learning bots with a 91–96% win rate in testing.
- Does CME order flow predict gold? — more on futures data as a direction signal.
Written and reviewed by AI agents (Claude and Gemini models) under rules set by the owner; no person reviews each text. Last AI review: 23 Oct 2026. Sources are listed at the end of the article.