AI-Assisted Trading

AI-assisted trading is not a single strategy but a family of approaches in which a machine-learning model or a large language model takes over part of the work a trader would otherwise do by hand. The label covers very different things, and the first useful question about any version is not which model it uses but where in the process the AI sits.

Three placements account for most published versions. At **design time**, a language model helps frame a hypothesis, turn it into rules and write the code; once the code exists the AI is gone, and what runs is an ordinary deterministic strategy, judged like any other. At **runtime**, a classifier, neural network or reinforcement-learning agent is evaluated bar by bar, and its output becomes a directional bias, an entry trigger, a filter or a position size. Inside a **third-party platform**, the logic is not visible at all and the user only configures what the vendor exposes.

## How the mechanics work

Runtime versions share a skeleton regardless of model. Features are derived from price: returns, indicator values, volatility measures. A label defines what the model predicts — usually the sign of the return over the next N bars, sometimes a barrier-based label accounting for whether a stop or target is hit first. A training window supplies the examples, fitted once or rolled forward. A decision rule maps model output to a position: a class vote, a probability threshold, or a size scaled by confidence.

On-chart implementations are the simplest instance: a k-nearest-neighbours indicator locates the historical bars whose feature vector most resembles the current one, takes a majority vote of what followed them, and plots the result as a directional bias. Reinforcement-learning versions replace the label with a reward function and learn a policy over a small action set, sometimes paired with Kelly-style sizing. Design-time versions carry none of this machinery: the model's contribution ended when the code was written.

## Main variants

The recurring families are model-authored strategies, where a language model writes the rules or code; classical classifiers such as k-nearest neighbours or decision trees used as a bias layer or entry trigger; neural networks trained to forecast direction; reinforcement-learning agents with an explicit reward and sizing rule; "AI-enhanced" versions of conventional indicators, where a model adapts parameters or smooths an oscillator; machine-learning filters added to a classical system such as a breakout or trend-following ruleset; and commercial AI bots that are configured rather than coded. A separate branch uses the model only as an analysis assistant, with execution left discretionary.

## What typically differentiates implementations

Beyond the placement question, the decisive details are the feature set and how it is normalised, the prediction horizon and labelling choice, the retraining cadence — fitted once versus refit on a rolling window — and whether the model consumes only closed-bar data. Equally important is how output becomes a trade: a model used as a veto over a conventional entry behaves nothing like one used as the entry itself, even when both carry the same label. Transparency is the last axis: an inspectable script and an opaque vendor bot cannot be judged on the same terms.

## Common mistakes

Lookahead is the dominant failure. Features or normalisation computed over the whole dataset, labels that peek beyond the decision point, or an indicator that repaints — revising its own past signals as later bars arrive — all produce a history that never existed live. Shuffled cross-validation reaches the same illusion by another route, since training on future data to classify the past leaks information; time-ordered splits with a gap between train and test are the minimum standard. Overfitting is also cheaper here, because the parameter space is larger: neighbours, window length, feature count and thresholds can all be tuned until any sample looks convincing. Accepting generated code without reading it is a separate hazard: plausible-looking scripts routinely misuse an indicator or mishandle sessions. And prediction accuracy is not expectancy: a model right slightly more often than not can still lose after costs if its winners are smaller than its losers or it flips position frequently.

## How to evaluate and backtest a version

Start by locating the AI and asking what would remain without it. Many versions reduce to a conventional rule set with a model attached, and that reduced version is the baseline the AI has to beat on the same data and costs.

Then validate in time order: walk-forward with retraining inside each fold, never a shuffled split, and with a gap between training and test windows when the label spans several bars. Check repainting by comparing live-recorded signals against the same script re-run over history. Run sensitivity on the model's own parameters: a result that collapses when the neighbour count moves by one, or the lookback shifts slightly, was fitted to the sample. Confirm on other instruments and volatility regimes, include realistic commissions and slippage, and where a version depends on an external API, treat latency, cost and downtime as part of the strategy. Where the logic is not visible, treat any result you cannot reproduce as unverified.

The 17 decoded versions linked from this page span that range, from model-authored scripts and on-chart machine-learning indicators to reinforcement-learning agents, AI filters over classical systems and commercial bots. Read side by side, they make the placement question concrete — usually the one that explains why two versions sharing the "AI" label behave nothing alike.

Strategies in this concept (74)

Frequently asked questions

Does "AI trading" mean the AI decides the trades?

Not necessarily, and this is the main source of confusion. In a large share of published versions the AI is used only at design time: it helps write the rules or the code, and what actually runs afterwards is a fixed, deterministic strategy with no model in it. In other versions a model is evaluated on every bar and genuinely produces the signal or the position size. A third group hides the logic inside a commercial platform. Before evaluating any version, establish which of the three it is, because the validation work required is completely different.

Can a language model write a profitable trading strategy?

It can write a syntactically valid strategy quickly, which is a real productivity gain, but it has no privileged information about markets and its fluency is not evidence that the logic has an edge. Generated code also fails in specific ways: misused indicator parameters, incorrect session or timezone handling, references to the wrong series, and rules that quietly differ from the prompt. Treat the output as a first draft to be read line by line and then validated exactly like any hand-written strategy.

What is a k-nearest-neighbours or machine-learning indicator actually doing on the chart?

Most of them compare the current bar's feature vector — typically some combination of price transforms and indicator values — against historical bars, select the closest matches, and summarise what happened after those matches into a directional bias. The two things worth checking are whether the calculation uses only closed-bar data, and whether the plotted history reflects what the indicator would have shown in real time. If past signals change as new bars arrive, any backtest built on that plot is reading a revised history.

How do I tell whether a machine-learning strategy is overfitted?

Three checks cover most cases. Compare it against the same strategy with the model removed or replaced by a simple heuristic, on identical data and costs; if the model adds nothing, the complexity is not justified. Validate with walk-forward retraining in strict chronological order rather than a shuffled split. And test parameter sensitivity: if performance depends on one exact neighbour count, window length or threshold, the value was fitted to the sample rather than discovered in it.

Are commercial "AI bots" the same concept as a machine-learning strategy?

They belong to the same family but sit at the opposite end of the transparency axis. With a bot platform you generally configure parameters over logic you cannot inspect, so you can measure results but not diagnose them, and you cannot separate the model's contribution from the underlying rules. That does not make them unusable, but it does mean the only meaningful evidence is your own forward-tested record on your own account, not published figures you have no way to reproduce.

If a model predicts direction correctly more often than not, does that make it profitable?

No. Directional accuracy says nothing about the size of winners relative to losers, about how often the strategy trades, or about what costs it pays. A model with modest accuracy and a favourable payoff structure can outperform a more accurate one that trades frequently and gives back the edge in commissions and slippage. Evaluate machine-learning versions on the same net-of-cost metrics you would use for any other strategy, not on classification scores.

All strategy concepts · Explore all strategies