{"slug": "world-models-for-quant-trading-what-they-are-and-how-they-perform-on-real-market", "title": "World Models for Quant Trading: What They Are and How They Perform on Real Market Data", "summary": "A developer built a passive world model on 30-minute bars across seven futures markets (S&P 500, Nasdaq 100, crude oil, gold, ten-year Treasury, euro and bitcoin), trained a trading strategy entirely inside the model's simulated price paths, then tested it on four years of unseen real data. The learned component found a short-term pattern that held up out of sample, but the study's central finding is that a strategy trained inside a world model learns the model's errors too: a small drift error in average return and a hand-set trading fee determined the strategy's behavior. The developer argues both the fee and the drift error can be measured and tested before any strategy is trained.", "body_md": "In 2018, Ha and Schmidhuber published [World Models](https://arxiv.org/abs/1803.10122). They trained a neural network to imitate a simple first-person video game, then trained a small controller entirely inside the network's imitation, and it played well in the real game. The [Dreamer](https://arxiv.org/abs/2301.04104) line of work took the idea much further, learning to play many games and control tasks largely by training inside a learned model of the environment.\n\n*Prefer to watch? A 4-minute video version of this study:*\n\nThe motivation for trading is straightforward. A market has one realised history. A learned model of the market can generate many plausible alternative histories, and a strategy can be trained on all of them. Finance research has moved quickly in this direction: [learned order-book simulators](https://arxiv.org/abs/2210.09897), [models that generate order messages one by one](https://arxiv.org/abs/2309.00638), [MarS](https://arxiv.org/abs/2409.07486), which treats order flow like a language model treats text, and [TRADES](https://arxiv.org/abs/2502.07071), which uses diffusion models. What is still rare is a plain test of the question a trader cares about: if a strategy learns inside such a model, what happens when it meets real prices?\n\nSo I built a small world model on seven futures markets, trained a trading strategy inside it, and tested that strategy on four years of real data it had never seen.\n\n**The main finding: a strategy trained inside a world model learns whatever the model contains, including its errors.** The world model in this study contained a genuine short-term pattern, but also a small error in the average return and a trading cost that I set by hand, and those two decided what the strategy did.\n\nThe learned part of the model performed well: it found a real pattern that held up for four years it had never seen, and the strategy trained with a small fee kept a profit on that unseen data. The two problems, the hand-set fee and the drift error, can both be measured and tested before a strategy is trained, which is where the research directions at the end of the post begin.\n\n## 1. What a world model is\n\nMost machine learning in trading produces a point forecast: one number, the expected next return, which you trade on directly. The model is judged by how often that number is right.\n\nA world model is used differently. It does not give one number; it gives a full probability distribution for what happens next, and you sample from it again and again to generate simulated market paths. You do not trade on its output. You train a strategy inside those paths. During training the strategy never sees the real market, only the model, so if the model has a mistake, the strategy is built around it.\n\nA full world model goes one step further: it also predicts how the market responds to the trader's own actions. In the World Models and Dreamer papers the next state depends on what the agent does. In finance, that means learning how fills, the spread and the price react to your orders, which is exactly what order-level simulators such as MarS aim for.\n\nThe world model in this study is the simpler, passive kind. It is a probabilistic forecaster of the next 30-minute return, run forward on its own samples to make paths. Prices in it ignore what the strategy does, and the only response to trading is a fee I wrote by hand. Most generative market models used to train trading strategies make the same simplification. It is worth testing first, because a passive world model is what most people can actually build, and because it isolates the two questions this post is about: are the learned prices good enough, and what does the hand-written part do?\n\n## 2. Model and data\n\nI used 30-minute bars on seven futures: the S&P 500, the Nasdaq 100, crude oil, gold, the ten-year Treasury, the euro and bitcoin. The world model learned how prices move from 2010 to 2021 only. Everything from 2022 to October 2026 was kept back as a final test.\n\nThe world model has parts I learned from data and parts I chose by hand. The learned parts produce prices: a small neural network that remembers recent bars and outputs a full range of possible next returns, so it can generate many different possible futures. The parts I chose by hand are the trading cost, a flat fee each time the strategy changes its position, and the goal, which is the strategy's Sharpe ratio after costs.\n\n### Architecture\n\nThe world model is a recurrent neural network with a probabilistic output, about 160,000 parameters in total. Its input at each 30-minute bar is three things: the last return, divided by that market's recent volatility so all seven markets are on the same scale; which of the seven markets it is; and the time of day. A two-layer GRU, a standard recurrent network with 128 units per layer, turns this sequence into a memory of recent conditions. This recurrent network with a mixture output is the same design as the memory component of the original World Models paper; the difference is that theirs also took the agent's action as an input, and the one used here does not.\n\nThe output is not a single forecast. It is a mixture of four bell curves, each with its own weight, centre and width. Mixing several bell curves lets the model produce the fat tails and sudden jumps of real returns, and lets it widen its range when recent bars have been volatile. The model was trained to make the real 2010-2021 returns as likely as possible under that distribution, which is the same principle as fitting any probability model to data.\n\nTo generate a simulated market path, the model reads 230 real bars to set its memory, draws the next return at random from its distribution, feeds that return back in as if it had happened, and repeats. Doing this 460 times gives ten trading days of artificial prices. Every run gives a different path, which is what makes it a world to train in rather than a forecast.\n\nI chose a small recurrent network on purpose. It trains in under a minute on one GPU, and the question here is what happens when a strategy is trained inside a learned market, not how large that market model can be. Larger versions of the same idea, built from transformers or diffusion models and working on individual orders, are described in the papers in section 6.\n\n### How the world model was trained\n\nEach training step shows the model 256 random stretches of 256 consecutive bars from 2010-2021, drawn from all seven markets. At every bar it gives a probability distribution for the next return, and the loss is how surprised it was by the return that actually came next: the negative log-likelihood, averaged per bar. The optimiser is Adam with a learning rate of 0.001 that decays over 4,000 steps, with gradient clipping. Training takes about 20 seconds on one RTX 4090.\n\nThe loss fell quickly in the first few hundred steps, from 1.48 to about 1.15 on unseen data, far below the 1.42 of a plain bell curve. After that the training loss kept falling, but the loss on unseen 2022-2026 data was best at step 900 and drifted up to 1.18 by the end. The model spent its last 3,000 steps learning details of the training years that did not carry forward. Stopping at step 900 would have given a slightly better model; I kept the full run so that nothing was chosen by looking at the test years.\n\n### The trading strategy\n\nThe trading strategy is a second small neural network. Every 30 minutes it looks at the last 32 bars and its current position, and decides how much to be long or short. Training adjusts it until its Sharpe ratio inside the world model is as high as possible. In AI research this is called an agent; here it is simply a learned trading rule.\n\nTraining the strategy follows a simple loop. The world model generates 512 fresh ten-day paths. The strategy trades each one bar by bar, paying the fee on every change of position. Its Sharpe ratio across all 512 paths is computed, and the strategy is adjusted in the direction that raises it. This repeats 600 times, with new paths each time, and takes about two minutes. After that the strategy is frozen and tested once on real data.\n\n## 3. Realism of the learned market\n\nBefore training any strategy, I checked whether the simulated market behaves like the real one. It does, on almost every test. It has the same big, rare moves as real markets. Calm periods and wild periods cluster together, as they do in reality. After a large move, the next bar tends to be large too, by about the same amount.\n\nBut one number was wrong. Over 2010 to 2021, the real markets drifted up: simply holding all seven long earned a Sharpe ratio of 0.34. The simulated market drifted down, with a Sharpe of minus 0.43. The error is small, less than half a percent of a typical bar's move, and is not visible in any of the distribution statistics. A strategy trained inside the model can still exploit it.\n\n### The drift statistic\n\nDrift is harder to learn than the shape of returns because the training loss barely depends on it: the model's drift error changes the loss by about 0.00003 per bar, against 0.24 for getting the shape right. It is also the cheapest thing for a strategy to exploit, because collecting it needs no trading. So drift should be checked separately, and usually set or corrected by hand.\n\n## 4. Learning a strategy on data from the world model\n\n**The test.** I trained the same strategy three times inside the world model, changing only one thing: the trading fee, set to zero, 0.1 basis points or 1 basis point per trade. Each trained strategy was then frozen and tested on real market data from January 2022 to October 2026, which neither the strategy nor the world model had seen.\n\n**With no fee or a small fee, the strategy learned a real pattern.** It learned to bet against the last 30-minute move: short after a rise, long after a fall. On real data this earned a Sharpe ratio of about 1.0 before costs, in both cases. The pattern is a known intraday effect, and the world model had learned it correctly.\n\n**The fee decided how the pattern was traded.** The reversal earns very little per trade, about 0.17 basis points. Trained with no fee, the strategy traded almost every bar; on real data it makes money only if trading costs less than about 0.12 basis points, and at 1 basis point its Sharpe ratio falls to minus 7.3. Trained with a 0.1 basis point fee, it learned to trade about a fifth as much, and kept a Sharpe ratio of 0.47 on real data after paying that fee.\n\n**With a 1 basis point fee, the strategy learned the model's error instead.** No pattern was worth that fee, so it held a short position permanently to collect the world model's false downward drift. On real data that lost money.\n\n## 5. Implications for world models in trading\n\nThe learned price model was the easier part. A small network trained in under a minute matched real markets closely and found a pattern that held up for four unseen years.\n\nThe hand-written parts decide the result. Trading costs, fills and market impact are usually set by hand, rarely tested, and the strategy trusts them completely. An incorrect cost assumption turned a real edge into a large loss.\n\nTraining will find the model's smallest mistake. A drift error too small to show in standard realism tests determined what the strategy did whenever trading was expensive.\n\n## 6. Research directions\n\nIn order of priority: **realistic trading costs**, modelling spread, fills and price impact with order-book simulators such as [order-message generation](https://arxiv.org/abs/2309.00638); **markets that react to the trader**, the gap studied in [Bridging the Reality Gap in Limit Order Book Simulation](https://arxiv.org/html/2603.24137v1); **realism tests that include drift and costs**, plus training a simple strategy inside the model and checking it on real data; **models that widen their range when unsure**; and **searching for many good strategies rather than one**, as [AlphaSAGE](https://arxiv.org/abs/2509.25055) does with [GFlowNets](https://arxiv.org/abs/2111.09266).\n\n## 7. Limitations\n\nOne small world model, one strategy design and flat round-number fees, on seven futures at one bar size. Prices do not react to the strategy, which makes the results optimistic. Each strategy was trained once, and all results are backtests on bar closes.\n\nIn summary, the learned price model was accurate enough to teach a strategy a real pattern. Whether that pattern made money was decided by the cost of trading and the average return, the two parts least constrained by the data.\n\n## References\n\n*Educational research only. Nothing here is investment advice.*\n\nThe [Trader plan on Delphic Alpha](https://delphicalpha.substack.com/subscribe?plan=founding&onestep=true) includes an annual subscription to all four publications: Delphic Alpha, The Microstructure Lab, Quant AI Lab and Quantum Trading Lab.", "url": "https://wpnews.pro/news/world-models-for-quant-trading-what-they-are-and-how-they-perform-on-real-market", "canonical_source": "https://quantailab.substack.com/p/world-models-for-quant-trading-what", "published_at": "2026-11-16 18:14:30+00:00", "updated_at": "2026-12-01 12:12:58.556041+00:00", "lang": "en", "topics": ["machine-learning", "artificial-intelligence", "ai-research"], "entities": ["Ha", "Schmidhuber", "Dreamer", "MarS", "TRADES"], "also_reported_by": [], "takeaway": "A strategy trained inside a passive world model inherits its flaws: a small drift error in average return and a hand-set trading fee, not the learned price dynamics, decided what the strategy did on four years of unseen futures data.", "recommendation": {"advice": "Before training a strategy inside a learned market model, measure the model's drift error and test sensitivity to the hand-set trading fee, since both can dominate the resulting policy.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/world-models-for-quant-trading-what-they-are-and-how-they-perform-on-real-market", "markdown": "https://wpnews.pro/news/world-models-for-quant-trading-what-they-are-and-how-they-perform-on-real-market.md", "text": "https://wpnews.pro/news/world-models-for-quant-trading-what-they-are-and-how-they-perform-on-real-market.txt", "jsonld": "https://wpnews.pro/news/world-models-for-quant-trading-what-they-are-and-how-they-perform-on-real-market.jsonld"}}